aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--lib/MGA/Advisories.pm5
2 files changed, 3 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 4a3d662..303066a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+- fix bugnum regexp for '12345.mga4' type advisory names
- add check to highlight that the first reference must be the MGA advisory bug
Version 0.19
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm
index 76bf4ef..f8d7f48 100644
--- a/lib/MGA/Advisories.pm
+++ b/lib/MGA/Advisories.pm
@@ -200,8 +200,7 @@ sub assign_id {
} else {
# Advisories are not always just [0-9]+.adv, but are
# sometimes [0-9]+.mga3.adv etc. so extract the real bug number
- my $advbugnum = $advname;
- $advbugnum =~ s/[^0-9]//g;
+ (my $advbugnum) = $advname =~ m/^([0-9]+)/g;
if (scalar($adv->{references}) < 1) {
print STDERR "No reference links found in advisory\n";
@@ -213,7 +212,7 @@ sub assign_id {
return;
}
if ($advbugnum ne $bugnum) {
- print STDERR "First reference is not the corresponding Mageia advisory bug\n";
+ print STDERR "First reference is not the corresponding Mageia advisory bug ($advbugnum != $bugnum)\n";
return;
}