4 Commits

Author SHA1 Message Date
a6714d037b prepare 1.4.7 release 2025-02-28 07:55:51 +01:00
bbe23b1549 better kernel version sorting
should now detect that 6.12.16 is newer than 6.6.74 for example
2025-02-28 07:53:11 +01:00
17fc601022 print service and policy for rouge services 2024-12-20 14:20:07 +01:00
f1ded26b9f properly log processes which still has open files after restart 2024-12-17 01:28:12 +01:00
3 changed files with 4 additions and 3 deletions

View File

@ -419,7 +419,8 @@ def pkg_upgrade():
for sysfile in ['config', 'initramfs', 'System.map', 'vmlinuz', 'kernel']: for sysfile in ['config', 'initramfs', 'System.map', 'vmlinuz', 'kernel']:
match = sorted( match = sorted(
[f for f in files if f.startswith(f'{sysfile}-')], [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:]: for f in match[keep_kernels:]:
log.debug(f"Removing old kernel file {f}") log.debug(f"Removing old kernel file {f}")
os.remove(os.path.join(root, f)) os.remove(os.path.join(root, f))

View File

@ -177,7 +177,7 @@ def restart_services():
if get_deleted_open_files(proc): if get_deleted_open_files(proc):
service = services[proc_name] service = services[proc_name]
policy = _get_service_restart_policy(service) 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 recommend_restart = True
return recommend_restart return recommend_restart

View File

@ -5,7 +5,7 @@ from setuptools import setup, find_packages
setup( setup(
name='sau', name='sau',
version='1.4.5', version='1.4.7',
description='Tool for auto-updating OS and packages', description='Tool for auto-updating OS and packages',
author='Feffe', author='Feffe',
author_email='feffe@fulh.ax', author_email='feffe@fulh.ax',