aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-08-21 10:17:46 +0100
committerColin Guthrie <colin@mageia.org>2014-08-21 10:17:46 +0100
commit73e6c053928b415522281c9dcc65994f613b6c3c (patch)
tree38bb2d6f1f3d187b7feacede2c324788e3363185 /lib
parenta0fa339d1dcc6e3d517d969c0ecc668665a5e1f4 (diff)
downloadmgaadvisories-73e6c053928b415522281c9dcc65994f613b6c3c.tar
mgaadvisories-73e6c053928b415522281c9dcc65994f613b6c3c.tar.gz
mgaadvisories-73e6c053928b415522281c9dcc65994f613b6c3c.tar.bz2
mgaadvisories-73e6c053928b415522281c9dcc65994f613b6c3c.tar.xz
mgaadvisories-73e6c053928b415522281c9dcc65994f613b6c3c.zip
Fix bugnum regexp for '12345.mga4' type advisory names
Diffstat (limited to 'lib')
-rw-r--r--lib/MGA/Advisories.pm5
1 files changed, 2 insertions, 3 deletions
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;
}