diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-10-17 07:37:27 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-10-17 07:37:27 +0000 |
commit | 81d0a5b0f77d7dfb9c03c050cc0202cdecf94c43 (patch) | |
tree | cd75ccc51e168627d186438583b1223f2478b870 /urpm/main_loop.pm | |
parent | 2d073593eb27703476f21ca68d7f85a5342eb5b2 (diff) | |
download | urpmi-81d0a5b0f77d7dfb9c03c050cc0202cdecf94c43.tar urpmi-81d0a5b0f77d7dfb9c03c050cc0202cdecf94c43.tar.gz urpmi-81d0a5b0f77d7dfb9c03c050cc0202cdecf94c43.tar.bz2 urpmi-81d0a5b0f77d7dfb9c03c050cc0202cdecf94c43.tar.xz urpmi-81d0a5b0f77d7dfb9c03c050cc0202cdecf94c43.zip |
final "Installation failed:" error message is empty when a transaction failed
and a "Try installation with..." question was prompted (#44960)
Diffstat (limited to 'urpm/main_loop.pm')
-rw-r--r-- | urpm/main_loop.pm | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm index 5f87caa7..b8a27349 100644 --- a/urpm/main_loop.pm +++ b/urpm/main_loop.pm @@ -228,15 +228,19 @@ foreach my $set (@{$state->{transaction} || []}) { #- Warning : the following message is parsed in urpm::parallel_* my $msg = N("Installation failed:") . "\n" . join("\n", map { "\t$_" } @l) . "\n"; + my $retry; if ($fatal || $urpm->{options}{auto} || !$urpm->{options}{'allow-nodeps'} && !$urpm->{options}{'allow-force'}) { - ++$nok; + print $msg; ++$urpm->{logger_id}; + } else { + $retry = $callbacks->{ask_yes_or_no}->(N("Installation failed"), + $msg . N("Try installation without checking dependencies? (y/N) ")); + } + if (!$retry) { + ++$nok; push @errors, @l; $fatal and last; - print $msg; } else { - $callbacks->{ask_yes_or_no}->(N("Installation failed"), - $msg . N("Try installation without checking dependencies? (y/N) ")) or ++$nok, next; $urpm->{log}("starting installing packages without deps"); @l = urpm::install::install($urpm, $to_remove, @@ -247,14 +251,18 @@ foreach my $set (@{$state->{transaction} || []}) { if (@l) { #- Warning : the following message is parsed in urpm::parallel_* my $msg = N("Installation failed:") . "\n" . join("\n", map { "\t$_" } @l) . "\n"; + my $retry; if (!$urpm->{options}{'allow-force'}) { print $msg; - ++$nok; ++$urpm->{logger_id}; + } else { + $retry = $callbacks->{ask_yes_or_no}->(N("Installation failed"), + $msg . N("Try harder to install (--force)? (y/N) ")); + } + if (!$retry) { + ++$nok; push @errors, @l; } else { - $callbacks->{ask_yes_or_no}->(N("Installation failed"), - $msg . N("Try harder to install (--force)? (y/N) ")) or ++$nok, next; $urpm->{log}("starting force installing packages without deps"); @l = urpm::install::install($urpm, $to_remove, |