pacman/repo: update enum members to uppercase (#3076)

This commit is contained in:
codefiles 2025-01-07 15:37:43 -05:00 committed by GitHub
parent fa515dfdc6
commit fd91cbaac1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 9 deletions

View File

@ -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.")

View File

@ -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}\]$")

View File

@ -2,5 +2,5 @@ from enum import Enum
class Repo(Enum):
Multilib = "multilib"
Testing = "testing"
MULTILIB = "multilib"
TESTING = "testing"