summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-05-17 10:30:24 +0000
committerThierry Vignaud <tv@mageia.org>2013-05-17 10:30:24 +0000
commit017cc45d6a272ac0dc238030e53e223a1598d195 (patch)
treeeb7984b2148d2eacb6cb74dfa9c311d99e4c53f0
parent60aac5852545cc4e94ab0f2d1bbb646eefdc68be (diff)
downloadurpmi-017cc45d6a272ac0dc238030e53e223a1598d195.tar
urpmi-017cc45d6a272ac0dc238030e53e223a1598d195.tar.gz
urpmi-017cc45d6a272ac0dc238030e53e223a1598d195.tar.bz2
urpmi-017cc45d6a272ac0dc238030e53e223a1598d195.tar.xz
urpmi-017cc45d6a272ac0dc238030e53e223a1598d195.zip
display all errors at once at end (mga#6086)
(like urpmi/rpmdrake/drakx), instead of forcing users to click in order to continue transactions
-rwxr-xr-xgurpmi27
1 files changed, 7 insertions, 0 deletions
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);