From 73e6c053928b415522281c9dcc65994f613b6c3c Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Thu, 21 Aug 2014 10:17:46 +0100 Subject: Fix bugnum regexp for '12345.mga4' type advisory names --- NEWS | 1 + lib/MGA/Advisories.pm | 5 ++--- 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; } -- cgit v1.2.1