From b9846fe26e87285ceab8ae5cd9c212325bd15f51 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 21 Mar 2024 16:27:50 -0700 Subject: Cross-check that at least one SRPM is listed in the advisory An advisory must come with at least one fixed package. --- lib/MGA/Advisories.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') 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}}) { -- cgit v1.2.1