Skip to content

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

Merged
dwoz merged 3 commits into
saltstack:3006.xfrom
SAY-5:say5/kernelpkg-apt-kernel-type-regex-69131
Jun 30, 2026
Merged

dwoz merged 3 commits into
saltstack:3006.xfrom
SAY-5:say5/kernelpkg-apt-kernel-type-regex-69131

Conversation

@SAY-5

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

Copy link
Copy Markdown
Contributor

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

@dwoz
dwoz merged commit b7f97b9 into saltstack:3006.x Jun 30, 2026
489 of 492 checks passed

This branch was previously deployed

1 inactive deployment
ci — e3774e3a Deployed Jun 19, 2026 by dwoz via Build Onedir Packages / Windows (amd64) #24511
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants