From 8d373f599cc52a689f6f67eb8814d5d446bd48d9 Mon Sep 17 00:00:00 2001 From: Fredrik Eriksson Date: Wed, 23 Oct 2024 17:03:30 +0200 Subject: [PATCH] Fix eclass check for packages with many revisions --- sau/gentoo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sau/gentoo.py b/sau/gentoo.py index f1b5d8a..4e3e27c 100644 --- a/sau/gentoo.py +++ b/sau/gentoo.py @@ -119,6 +119,9 @@ def is_system_package(atom, eclasses): log.debug(f"{name} is a sys-boot package") return True + if eclasses is True: + return True + # libc-packages should be considered system-packages as they generally # 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 @@ -140,7 +143,7 @@ def is_system_package(atom, eclasses): def get_eclasses(atom): log = logging.getLogger(sau.LOGNAME) 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+') cmd=[ EQUERY_PATH, 'w', name ] ret, out, err = sau.helpers.exec_cmd(cmd)