aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MGA
diff options
context:
space:
mode:
authorDan Fandrich <danf@mageia.org>2024-03-21 16:27:50 -0700
committerDan Fandrich <danf@mageia.org>2024-03-21 16:28:15 -0700
commitb9846fe26e87285ceab8ae5cd9c212325bd15f51 (patch)
treec655687db170d90a8b77e71718220007f81d7947 /lib/MGA
parentfe405b428456decd6fed841fd6de6b8e09e73e55 (diff)
downloadmgaadvisories-b9846fe26e87285ceab8ae5cd9c212325bd15f51.tar
mgaadvisories-b9846fe26e87285ceab8ae5cd9c212325bd15f51.tar.gz
mgaadvisories-b9846fe26e87285ceab8ae5cd9c212325bd15f51.tar.bz2
mgaadvisories-b9846fe26e87285ceab8ae5cd9c212325bd15f51.tar.xz
mgaadvisories-b9846fe26e87285ceab8ae5cd9c212325bd15f51.zip
Cross-check that at least one SRPM is listed in the advisory
An advisory must come with at least one fixed package.
Diffstat (limited to 'lib/MGA')
-rw-r--r--lib/MGA/Advisories.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm
index 2db96db..dbb7408 100644
--- a/lib/MGA/Advisories.pm
+++ b/lib/MGA/Advisories.pm
@@ -340,6 +340,10 @@ sub assign_id {
$buffer .= $msg;
my $ua = LWP::UserAgent->new;
$ua->max_redirect(0);
+ if (! keys %{$adv->{src}}) {
+ print $msg = "✘ (None found)\n";
+ $failed = 1;
+ }
foreach my $rel (keys %{$adv->{src}}) {
foreach my $media (keys %{$adv->{src}{$rel}}) {
foreach my $srpm (@{$adv->{src}{$rel}{$media}}) {