aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/MGA/Advisories.pm20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm
index f8d7f48..63b6953 100644
--- a/lib/MGA/Advisories.pm
+++ b/lib/MGA/Advisories.pm
@@ -239,6 +239,7 @@ sub assign_id {
$failed = 1;
}
+ my $depsfailed = 0;
printf "%-40s", "Checking dependent bugs… ";
my $depends = $bug->{depends_on};
if (scalar(@$depends) < 1) {
@@ -254,7 +255,7 @@ sub assign_id {
if ($blocking_bug->{is_open}) {
print "✘ $dependent_bug_num";
- $failed = 1;
+ $depsfailed = 1;
} else {
print "✔ $dependent_bug_num";
}
@@ -267,6 +268,23 @@ sub assign_id {
print "\n";
}
+
+ if (!$failed && $depsfailed) {
+ ReadMode 4; # Turn off controls keys
+ print "Dependent bug! Publish anyway? [y/N]: ";
+ my $key = 'x';
+ while ( $key ne "\n" && $key ne "y" && $key ne "Y" && $key ne "n" && $key ne "N" ) {
+ $key = ReadKey(0);
+ }
+ ReadMode 0; # Reset tty mode before exiting
+ if ( $key eq "\n" || $key eq "n" || $key eq "N" ) {
+ $failed = 1;
+ print " ✘\n";
+ } else {
+ print " ✔\n";
+ }
+ }
+
printf "%-40s", "Checking SRPMs… ";
my $ua = LWP::UserAgent->new;
$ua->max_redirect(0);