summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-10-06 15:59:07 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-10-06 15:59:07 +0000
commitd464851248d578fb57abf2e1437e33bad2b07b09 (patch)
treeb33060e4a5c561340cf5dc3fd10851de9c59aa3a
parent3d31e295c06427f024ea53901f8eab2e49dcea43 (diff)
downloadurpmi-d464851248d578fb57abf2e1437e33bad2b07b09.tar
urpmi-d464851248d578fb57abf2e1437e33bad2b07b09.tar.gz
urpmi-d464851248d578fb57abf2e1437e33bad2b07b09.tar.bz2
urpmi-d464851248d578fb57abf2e1437e33bad2b07b09.tar.xz
urpmi-d464851248d578fb57abf2e1437e33bad2b07b09.zip
- urpmi, rpmdrake:
o nice exit code for "bad signature" fatal error. Fixes rpmdrake continuing on bad signature (#44575) (backported from trunk)
-rw-r--r--NEWS4
-rw-r--r--pod/urpmi.8.pod4
-rw-r--r--urpm/main_loop.pm2
-rwxr-xr-xurpmi4
4 files changed, 11 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index df8580a4..0ade1984 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+- urpmi, rpmdrake:
+ o nice exit code for "bad signature" fatal error. Fixes rpmdrake continuing
+ on bad signature (#44575)
+
Version 6.14 - 23 September 2008
- use "versioned" media_info files
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 {