diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-06-17 14:31:51 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-06-17 14:31:51 +0000 |
commit | afee969c4aa80f36cda9a3967e9c4c964867658e (patch) | |
tree | d319be10089bbdf718345bf3046af41037ca1ce6 /lib/MGA | |
parent | a27af5aff4df03c1836201d7e045ef137454a6af (diff) | |
download | mgaadvisories-afee969c4aa80f36cda9a3967e9c4c964867658e.tar mgaadvisories-afee969c4aa80f36cda9a3967e9c4c964867658e.tar.gz mgaadvisories-afee969c4aa80f36cda9a3967e9c4c964867658e.tar.bz2 mgaadvisories-afee969c4aa80f36cda9a3967e9c4c964867658e.tar.xz mgaadvisories-afee969c4aa80f36cda9a3967e9c4c964867658e.zip |
List unpublished advisories when mode is set to 'qa'
Diffstat (limited to 'lib/MGA')
-rw-r--r-- | lib/MGA/Advisories.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm index d321017..a69cf16 100644 --- a/lib/MGA/Advisories.pm +++ b/lib/MGA/Advisories.pm @@ -58,7 +58,10 @@ sub get_advisories_from_dir { my %advisories; foreach my $advfile (glob "$config->{advisories_dir}/*.adv") { my $adv = LoadFile($advfile); - next unless $adv->{ID}; + if (!$adv->{ID}) { + next unless $config->{mode} eq 'qa'; + $adv->{ID} = next_id('TODO', keys %advisories); + } report_exit("Duplicate advisory $adv->{ID}") if $advisories{$adv->{ID}}; report_exit("Unknown type $adv->{type}") unless $config->{advisory_types}{$adv->{type}}; |