fix: false kernel update reports when linux-image-generic meta-package is installed#814
Merged
furlongm merged 2 commits intofurlongm:mainfrom Apr 25, 2026
Conversation
Owner
|
Nice find! This might be a simpler approach? |
… back to running kernel
Contributor
Author
Agreed, simpler approach. Updated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thoughapt upgradewould never offer it.Root cause
find_deb_kernel_updatesextracts the kernel series (e.g.5.15) from each installed kernel package name to avoid cross-track comparisons (GA vs HWE). For meta-packages likelinux-image-generic,get_deb_kernel_series()returnsNonebecause the name contains no version number. The series guard wasif installed_series is not None, so meta-packages bypassed it entirely.Additionally,
processed_prefixesmarks thelinux-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 correct5.15series. The net result: the highestlinux-image-*-genericin the repo regardless of kernel series was reported as an update.Fix
When
get_deb_kernel_series()returnsNonefor a meta-package, fall back to parsing the series fromself.kernel(the running kernel string). This ensures the series guard always runs, correctly excluding packages from a different kernel track.