Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
a6714d037b
|
|||
bbe23b1549
|
|||
17fc601022
|
|||
f1ded26b9f
|
|||
8d373f599c
|
@ -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)
|
||||
@ -416,7 +419,8 @@ def pkg_upgrade():
|
||||
for sysfile in ['config', 'initramfs', 'System.map', 'vmlinuz', 'kernel']:
|
||||
match = sorted(
|
||||
[f for f in files if f.startswith(f'{sysfile}-')],
|
||||
reverse=True)
|
||||
reverse=True,
|
||||
key=lambda x: tuple(map(int, x.split('-')[1].split('.')[:3])))
|
||||
for f in match[keep_kernels:]:
|
||||
log.debug(f"Removing old kernel file {f}")
|
||||
os.remove(os.path.join(root, f))
|
||||
|
@ -177,7 +177,7 @@ def restart_services():
|
||||
if get_deleted_open_files(proc):
|
||||
service = services[proc_name]
|
||||
policy = _get_service_restart_policy(service)
|
||||
_warn(policy, f'{proc} still has deleted files open')
|
||||
log.warning(f'{proc} (service {service} with policy {policy}) still has deleted files open')
|
||||
recommend_restart = True
|
||||
return recommend_restart
|
||||
|
||||
|
Reference in New Issue
Block a user