From 017cc45d6a272ac0dc238030e53e223a1598d195 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 17 May 2013 10:30:24 +0000 Subject: display all errors at once at end (mga#6086) (like urpmi/rpmdrake/drakx), instead of forcing users to click in order to continue transactions --- gurpmi2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gurpmi2 b/gurpmi2 index 3a3f620b..30540ac3 100755 --- a/gurpmi2 +++ b/gurpmi2 @@ -267,6 +267,9 @@ sub do_install_3 () { $mainw->init_progressbar; + my @errors; + local $urpm->{error} = sub { warn "@_\n"; push @errors, @_ }; + my $exit_code; $exit_code = urpm::main_loop::run($urpm, $state, scalar(@gurpmi::names), \@ask_unselect, { bad_signature => sub { @@ -296,6 +299,10 @@ sub do_install_3 () { ask_yes_or_no => \&ask_yes_or_no, completed => sub { + if (@errors) { + ask_warn(N("An error occurred:") . "\n\n" . join("\n", @errors)); + } + $urpmi_lock->unlock; $rpm_lock->unlock; urpm::removable::try_umounting_removables($urpm); -- cgit v1.2.1