Fix eclass check for packages with many revisions

This commit is contained in:
Fredrik Eriksson 2024-10-23 17:03:30 +02:00
parent 17ef7eee8e
commit 8d373f599c
Signed by: feffe
GPG Key ID: E6B5580B853D322B

View File

@ -119,6 +119,9 @@ def is_system_package(atom, eclasses):
log.debug(f"{name} is a sys-boot package") log.debug(f"{name} is a sys-boot package")
return True return True
if eclasses is True:
return True
# libc-packages should be considered system-packages as they generally # libc-packages should be considered system-packages as they generally
# requires the system to be restarted. Not sure if there is a better way # requires the system to be restarted. Not sure if there is a better way
# then just checking for specific packages here, but as far as I know there # then just checking for specific packages here, but as far as I know there
@ -140,7 +143,7 @@ def is_system_package(atom, eclasses):
def get_eclasses(atom): def get_eclasses(atom):
log = logging.getLogger(sau.LOGNAME) log = logging.getLogger(sau.LOGNAME)
eclasses = [] eclasses = []
name=re.sub(r'^[<=>]*(.*?)(?:-\d)?(?:::\w+)?$', r'\1', atom) name=re.sub(r'^[<=>]*(.*?)(?:-\d+)?(?:::\w+)?$', r'\1', atom)
test_re = re.compile(r'^\s*inherit\s+') test_re = re.compile(r'^\s*inherit\s+')
cmd=[ EQUERY_PATH, 'w', name ] cmd=[ EQUERY_PATH, 'w', name ]
ret, out, err = sau.helpers.exec_cmd(cmd) ret, out, err = sau.helpers.exec_cmd(cmd)