summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-10-06 15:43:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-10-06 15:43:26 +0000
commit2263fff1c0a5fc0c4ab5fe6979148d3546834b91 (patch)
treedcb27ccb35fb8d9a467499aed114ae6ab1487913
parentdd368f3a94158a85906adcd4d261e9fb9bd7c3e1 (diff)
downloadurpmi-2263fff1c0a5fc0c4ab5fe6979148d3546834b91.tar
urpmi-2263fff1c0a5fc0c4ab5fe6979148d3546834b91.tar.gz
urpmi-2263fff1c0a5fc0c4ab5fe6979148d3546834b91.tar.bz2
urpmi-2263fff1c0a5fc0c4ab5fe6979148d3546834b91.tar.xz
urpmi-2263fff1c0a5fc0c4ab5fe6979148d3546834b91.zip
- urpmi, rpmdrake:
o nice exit code for "bad signature" fatal error. Fixes rpmdrake continuing on bad signature (#44575)
-rw-r--r--NEWS3
-rw-r--r--pod/urpmi.8.pod4
-rw-r--r--urpm/main_loop.pm2
-rwxr-xr-xurpmi4
4 files changed, 10 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index aadaf51a..5260aa23 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- urpmi, rpmdrake:
+ o nice exit code for "bad signature" fatal error. Fixes rpmdrake continuing
+ on bad signature (#44575)
- gurpmi:
o do not exit in --auto mode at end of installation which prevents
restarting after priority upgrade
diff --git a/pod/urpmi.8.pod b/pod/urpmi.8.pod
index 64204268..979a3249 100644
--- a/pod/urpmi.8.pod
+++ b/pod/urpmi.8.pod
@@ -492,6 +492,10 @@ Some files are missing and some transactions failed but not all.
Some files are missing and all transactions failed.
+=item 15
+
+Bad signature
+
=back
=head1 BUG REPORTS
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm
index d7fbb504..546c0828 100644
--- a/urpm/main_loop.pm
+++ b/urpm/main_loop.pm
@@ -143,7 +143,7 @@ foreach my $set (@{$state->{transaction} || []}) {
: N("The following packages have bad signatures");
my $msg2 = N("Do you want to continue installation ?");
my $p = join "\n", @bad_signatures;
- $callbacks->{bad_signature}->("$msg:\n$p\n", $msg2);
+ $callbacks->{bad_signature}->("$msg:\n$p\n", $msg2) or return 15;
}
}
diff --git a/urpmi b/urpmi
index 9d7bdffb..ca075083 100755
--- a/urpmi
+++ b/urpmi
@@ -642,10 +642,10 @@ my $exit_code = urpm::main_loop::run($urpm, $state,
#- rurpmi always abort here
if ($urpm->{options}{auto} || $restricted) {
print "$msg\n";
- exit 1;
+ 0;
} else {
my $yesexpr = N("Yy");
- $force || message_input_("$msg$msg2" . N(" (y/N) "), boolean => 1) =~ /[$yesexpr]/ or exit 1;
+ $force || message_input_("$msg$msg2" . N(" (y/N) "), boolean => 1) =~ /[$yesexpr]/;
}
},
ask_yes_or_no => sub {