From 24cac3777cc6d90dc68c890e86fb9303707ad470 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 24 Aug 2012 11:16:57 +0000 Subject: (_verify_rpm) make sure to have a meaningfull return code when calling 'bad_signature' callback (run) fix installing a package if user acks bogus signature (regression introduced in commit r4862 on 2012-06-08: "(_download_all) split it out of run()") --- urpm/main_loop.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'urpm/main_loop.pm') diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm index 745494c9..09cf1024 100644 --- a/urpm/main_loop.pm +++ b/urpm/main_loop.pm @@ -126,7 +126,8 @@ sub _verify_rpm { : 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) or return 16; + my $res = $callbacks->{bad_signature}->("$msg:\n$p\n", $msg2); + return $res ? 0 : 16; } } @@ -361,7 +362,8 @@ sub run { #- verify packages if (!$force && ($options->{'verify-rpm'} || grep { $_->{'verify-rpm'} } @{$urpm->{media}})) { - _verify_rpm($urpm, $callbacks, \%transaction_sources_install, $transaction_sources); + my $res = _verify_rpm($urpm, $callbacks, \%transaction_sources_install, $transaction_sources); + $res and return $res; } #- install source package only (whatever the user is root or not, but use rpm for that). -- cgit v1.2.1