From 47bcfee5bbcadc9ff21933d4de4d13a09ec0a1ec Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 14 Oct 2008 18:17:54 +0000 Subject: - urpmi o diskspace issues are now a fatal error (need perl-URPM 3.20) (no use going on with the other transactions) --- urpm/main_loop.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'urpm/main_loop.pm') diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm index bdeb1aac..5f87caa7 100644 --- a/urpm/main_loop.pm +++ b/urpm/main_loop.pm @@ -222,13 +222,18 @@ foreach my $set (@{$state->{transaction} || []}) { %install_options_common, ); if (@l) { + my ($raw_error, $translated) = partition { /^(badarch|bados|installed|badrelocate|conflicts|installed|diskspace|disknodes|requires|conflicts|unknown)\@/ } @l; + @l = @$translated; + my $fatal = grep { /^disk/ } @$raw_error; + #- Warning : the following message is parsed in urpm::parallel_* my $msg = N("Installation failed:") . "\n" . join("\n", map { "\t$_" } @l) . "\n"; - if ($urpm->{options}{auto} || !$urpm->{options}{'allow-nodeps'} && !$urpm->{options}{'allow-force'}) { - print $msg; + if ($fatal || $urpm->{options}{auto} || !$urpm->{options}{'allow-nodeps'} && !$urpm->{options}{'allow-force'}) { ++$nok; ++$urpm->{logger_id}; 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; -- cgit v1.2.1