Skip to content

fix: false kernel update reports when linux-image-generic meta-package is installed#814

Merged
furlongm merged 2 commits intofurlongm:mainfrom
mhrznamn068:fix/deb-kernel-meta-package-series-check
Apr 25, 2026
Merged

fix: false kernel update reports when linux-image-generic meta-package is installed#814
furlongm merged 2 commits intofurlongm:mainfrom
mhrznamn068:fix/deb-kernel-meta-package-series-check

Conversation

@mhrznamn068
Copy link
Copy Markdown
Contributor

Problem

Hosts running Ubuntu 22.04 with linux-image-generic (the GA meta-package) installed were incorrectly reported by patchman as having an available kernel update to the HWE series (e.g. linux-image-6.8.0-106-generic) even though apt upgrade would never offer it.

Root cause

find_deb_kernel_updates extracts the kernel series (e.g. 5.15) from each installed kernel package name to avoid cross-track comparisons (GA vs HWE). For meta-packages like linux-image-generic, get_deb_kernel_series() returns None because the name contains no version number. The series guard was if installed_series is not None, so meta-packages bypassed it entirely.

Additionally, processed_prefixes marks the linux-image- prefix as consumed by the meta-package, preventing the versioned package (linux-image-5.15.0-176-generic) from being processed later with the correct 5.15 series. The net result: the highest linux-image-*-generic in the repo regardless of kernel series was reported as an update.

Fix

When get_deb_kernel_series() returns None for a meta-package, fall back to parsing the series from self.kernel (the running kernel string). This ensures the series guard always runs, correctly excluding packages from a different kernel track.

@furlongm
Copy link
Copy Markdown
Owner

Nice find!

This might be a simpler approach?

if installed_series is None:
    continue
processed_prefixes.add(prefix)

@mhrznamn068
Copy link
Copy Markdown
Contributor Author

Nice find!

This might be a simpler approach?

if installed_series is None:
    continue
processed_prefixes.add(prefix)

Agreed, simpler approach. Updated.

@furlongm furlongm merged commit bba4d20 into furlongm:main Apr 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants