summaryrefslogtreecommitdiffstats
path: root/gurpmi2
diff options
context:
space:
mode:
Diffstat (limited to 'gurpmi2')
-rwxr-xr-xgurpmi213
1 files changed, 12 insertions, 1 deletions
diff --git a/gurpmi2 b/gurpmi2
index ee542818..47bc0225 100755
--- a/gurpmi2
+++ b/gurpmi2
@@ -259,7 +259,8 @@ sub do_install_3 () {
$mainw->init_progressbar;
- my $exit_code = urpm::main_loop::run($urpm, $state, scalar(@gurpmi::names), \@ask_unselect, {
+ my $exit_code;
+ $exit_code = urpm::main_loop::run($urpm, $state, scalar(@gurpmi::names), \@ask_unselect, {
bad_signature => sub {
my ($msg, $msg2) = @_;
$urpm->{log}("$msg\n$msg2");
@@ -276,6 +277,15 @@ sub do_install_3 () {
1;
},
trans_log => \&gurpm::RPMProgressDialog::callback_download,
+ post_download => sub {
+ if ($mainw->canceled) {
+ $exit_code = 10;
+ warn ">> CANCELING\n";
+ goto return_with_exit_code;
+ }
+ $mainw->invalidate_cancel_forever;
+ },
+
ask_yes_or_no => \&ask_yes_or_no,
completed => sub {
@@ -340,6 +350,7 @@ sub do_install_3 () {
exec $0, @ARGV;
}
+return_with_exit_code:
# Show postponed message before exiting
$urpm->{error}->($urpm::postponed_msg) if $urpm::postponed_code != 0;