From 84c2ed6a4cffa5ede67dc8a4c2d5f1e0d232898a Mon Sep 17 00:00:00 2001 From: randomnoise Date: Tue, 7 Jul 2026 13:35:27 +0300 Subject: [PATCH 1/2] Purge residual linux-hwe-* `tools` and `headers` kernel packages --- usr/lib/linuxmint/mintUpdate/kernelwindow.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/usr/lib/linuxmint/mintUpdate/kernelwindow.py b/usr/lib/linuxmint/mintUpdate/kernelwindow.py index 6fa64932..1dc6b13e 100755 --- a/usr/lib/linuxmint/mintUpdate/kernelwindow.py +++ b/usr/lib/linuxmint/mintUpdate/kernelwindow.py @@ -439,9 +439,15 @@ def install_kernels(self, kernels): _KERNEL_PKG_NAMES.append("linux-image-unsigned-VERSION-KERNELTYPE") _KERNEL_PKG_NAMES.append("linux-tools-VERSION") _KERNEL_PKG_NAMES.append("linux-tools-VERSION-KERNELTYPE") + _KERNEL_PKG_NAMES.append("linux-hwe-MAJOR_MINOR_VERSION-tools-VERSION") + _KERNEL_PKG_NAMES.append("linux-hwe-MAJOR_MINOR_VERSION-headers-VERSION") for name in _KERNEL_PKG_NAMES: - name = name.replace("VERSION", kernel.version).replace("-KERNELTYPE", kernel.type) + name = (name + .replace("MAJOR_MINOR_VERSION", kernel.version.rpartition('.')[0]) + .replace("VERSION", kernel.version) + .replace("-KERNELTYPE", kernel.type) + ) if name in self.cache: pkg = self.cache[name] if kernel.installed: From d487f6e36c79fb9adea51f7d1f96340053bca4e0 Mon Sep 17 00:00:00 2001 From: randomnoise Date: Mon, 13 Jul 2026 13:43:46 +0300 Subject: [PATCH 2/2] Use `extend()` over `append()` method --- usr/lib/linuxmint/mintUpdate/kernelwindow.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/usr/lib/linuxmint/mintUpdate/kernelwindow.py b/usr/lib/linuxmint/mintUpdate/kernelwindow.py index 1dc6b13e..732d1199 100755 --- a/usr/lib/linuxmint/mintUpdate/kernelwindow.py +++ b/usr/lib/linuxmint/mintUpdate/kernelwindow.py @@ -436,11 +436,13 @@ def install_kernels(self, kernels): _KERNEL_PKG_NAMES = KERNEL_PKG_NAMES.copy() if kernel.installed: # also purge existing residual kernel packages - _KERNEL_PKG_NAMES.append("linux-image-unsigned-VERSION-KERNELTYPE") - _KERNEL_PKG_NAMES.append("linux-tools-VERSION") - _KERNEL_PKG_NAMES.append("linux-tools-VERSION-KERNELTYPE") - _KERNEL_PKG_NAMES.append("linux-hwe-MAJOR_MINOR_VERSION-tools-VERSION") - _KERNEL_PKG_NAMES.append("linux-hwe-MAJOR_MINOR_VERSION-headers-VERSION") + _KERNEL_PKG_NAMES.extend([ + "linux-image-unsigned-VERSION-KERNELTYPE", + "linux-tools-VERSION", + "linux-tools-VERSION-KERNELTYPE", + "linux-hwe-MAJOR_MINOR_VERSION-tools-VERSION", + "linux-hwe-MAJOR_MINOR_VERSION-headers-VERSION", + ]) for name in _KERNEL_PKG_NAMES: name = (name