Skip to content

Commit

Permalink
is_klp_pkg(): Fix livepatch name format regex
Browse files Browse the repository at this point in the history
SLE Micro kernels have short kernel version strings with only one
release number token. However, the livepatch name regex required
at least two tokens.
  • Loading branch information
mdoucha committed Feb 5, 2025
1 parent 148e498 commit 8d4f1d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/klp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ sub is_klp_pkg {
my $base = qr/(?:kgraft-|kernel-live)patch/;

if ($$pkg{name} =~ m/^${base}-\d+/) {
if ($$pkg{name} =~ m/^${base}-(\d+_\d+_\d+-\d+(?:_stage|_*\d*)_\d*)-([a-z][a-z0-9]*)$/) {
if ($$pkg{name} =~ m/^${base}-(\d+_\d+_\d+-\d+(?:_stage_\d+|(?:_\d+){1,2})?)-([a-z][a-z0-9]*)$/) {
my $kver = $1;
my $kflavor = $2;
$kver =~ s/_(?!stage)/./g;
Expand Down

0 comments on commit 8d4f1d0

Please sign in to comment.