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()") --- NEWS | 2 ++ urpm/main_loop.pm | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 5b68c70d..e257f927 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ - decrease total package count when some files are missing +- fix installing a package if user acks bogus signature + (regression introduced in 7.0) Version 7.3 - 24 August 2012 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