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 --- lib/MGA/Advisories.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/MGA') 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