aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/MGA/Advisories.pm24
1 files changed, 23 insertions, 1 deletions
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm
index 1b50460..2d066b6 100644
--- a/lib/MGA/Advisories.pm
+++ b/lib/MGA/Advisories.pm
@@ -8,6 +8,7 @@ use DateTime;
use Email::Sender::Simple qw(try_to_sendmail);
use Email::Simple;
use Email::Simple::Creator;
+use HTTP::Request;
use LWP::UserAgent;
use File::Basename;
use XMLRPC::Lite;
@@ -263,8 +264,29 @@ sub assign_id {
print "\n";
}
+ printf "%-40s", "Checking SRPMs… ";
+ my $ua = LWP::UserAgent->new;
+ $ua->max_redirect(0);
+ foreach my $rel (keys %{$adv->{src}}) {
+ foreach my $media (keys %{$adv->{src}{$rel}}) {
+ foreach my $srpm (@{$adv->{src}{$rel}{$media}}) {
+ my $req = HTTP::Request->new(GET => "http://repository.mageia.org/qa/checksrpm/update/$rel/$media/$srpm");
+ my $resp = $ua->request($req);
+
+ if ($resp->code eq 302 && $resp->header('Location') =~ /\/qa\/checksrpm\/found$/) {
+ print "✔ ";
+ } else {
+ print "✘ ($rel/$media/$srpm) ";
+ $failed = 1;
+ }
+
+ }
+ }
+ }
+ print "\n";
+
if ($failed) {
- print STDERR "Error: Bugzilla cross check failed.\n";
+ print STDERR "Error: Cross check failed.\n";
return;
}
} else {