pacman/repo: update enum members to uppercase (#3076)
This commit is contained in:
parent
fa515dfdc6
commit
fd91cbaac1
|
|
@ -836,13 +836,13 @@ class Installer:
|
|||
pacman_conf = pacman.Config(self.target)
|
||||
if multilib:
|
||||
info("The multilib flag is set. This system will be installed with the multilib repository enabled.")
|
||||
pacman_conf.enable(pacman.Repo.Multilib)
|
||||
pacman_conf.enable(pacman.Repo.MULTILIB)
|
||||
else:
|
||||
info("The multilib flag is not set. This system will be installed without multilib repositories enabled.")
|
||||
|
||||
if testing:
|
||||
info("The testing flag is set. This system will be installed with testing repositories enabled.")
|
||||
pacman_conf.enable(pacman.Repo.Testing)
|
||||
pacman_conf.enable(pacman.Repo.TESTING)
|
||||
else:
|
||||
info("The testing flag is not set. This system will be installed without testing repositories enabled.")
|
||||
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ class Config:
|
|||
if not self.repos:
|
||||
return
|
||||
|
||||
if Repo.Testing in self.repos:
|
||||
if Repo.Multilib in self.repos:
|
||||
repos_pattern = f'({Repo.Multilib.value}|.+-{Repo.Testing.value})'
|
||||
if Repo.TESTING in self.repos:
|
||||
if Repo.MULTILIB in self.repos:
|
||||
repos_pattern = f'({Repo.MULTILIB.value}|.+-{Repo.TESTING.value})'
|
||||
else:
|
||||
repos_pattern = f'(?!{Repo.Multilib.value}).+-{Repo.Testing.value}'
|
||||
repos_pattern = f'(?!{Repo.MULTILIB.value}).+-{Repo.TESTING.value}'
|
||||
else:
|
||||
repos_pattern = Repo.Multilib.value
|
||||
repos_pattern = Repo.MULTILIB.value
|
||||
|
||||
pattern = re.compile(rf"^#\s*\[{repos_pattern}\]$")
|
||||
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ from enum import Enum
|
|||
|
||||
|
||||
class Repo(Enum):
|
||||
Multilib = "multilib"
|
||||
Testing = "testing"
|
||||
MULTILIB = "multilib"
|
||||
TESTING = "testing"
|
||||
|
|
|
|||
Loading…
Reference in New Issue