aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--lib/MGA/Advisories.pm4
2 files changed, 5 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index b89b938..bbe0c9e 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Version X
- add 'showjson' command to output an advisory in OSV JSON format
- have 'mksite' write JSON output files as well
- 'mksite' now runs twice as fast
+- cross-check that at least one SRPM is listed in the advisory on publish
Version 0.27
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}}) {