Skip to content

fix(kernelpkg_linux_apt): handle kernelrelease with '+' in _kernel_type (#69131)#69194

Open
SAY-5 wants to merge 1 commit into
saltstack:3006.xfrom
SAY-5:say5/kernelpkg-apt-kernel-type-regex-69131
Open

fix(kernelpkg_linux_apt): handle kernelrelease with '+' in _kernel_type (#69131)#69194
SAY-5 wants to merge 1 commit into
saltstack:3006.xfrom
SAY-5:say5/kernelpkg-apt-kernel-type-regex-69131

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 19, 2026

What does this PR do?

Fixes kernelpkg_linux_apt._kernel_type for Debian 13 (trixie) and other distros that ship a kernelrelease containing a + (for example 6.12.86+deb13-amd64). The regex now accepts the wider set of characters that modern Debian/Ubuntu kernels use, so kernelpkg.upgrade no longer raises AttributeError: 'NoneType' object has no attribute 'group'.

What issues does this PR fix or reference?

Fixes #69131

Previous Behavior

kernelpkg.upgrade crashed on Debian 13 with AttributeError: 'NoneType' object has no attribute 'group' because re.match(r"^[\d.-]+-(.+)$", "6.12.86+deb13-amd64") returned None.

New Behavior

_kernel_type returns the kernel suffix (e.g. amd64) on the existing fixtures and on the trixie release. A regression test pins the trixie input.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

No

…pe (saltstack#69131)

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
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.

1 participant