diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-10-14 18:17:54 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-10-14 18:17:54 +0000 |
commit | 47bcfee5bbcadc9ff21933d4de4d13a09ec0a1ec (patch) | |
tree | e3bb0a834fa84360a0fa354d141b9854d854e015 /urpm | |
parent | 450c06da61da2eaed8211403087fbd9f0374db85 (diff) | |
download | urpmi-47bcfee5bbcadc9ff21933d4de4d13a09ec0a1ec.tar urpmi-47bcfee5bbcadc9ff21933d4de4d13a09ec0a1ec.tar.gz urpmi-47bcfee5bbcadc9ff21933d4de4d13a09ec0a1ec.tar.bz2 urpmi-47bcfee5bbcadc9ff21933d4de4d13a09ec0a1ec.tar.xz urpmi-47bcfee5bbcadc9ff21933d4de4d13a09ec0a1ec.zip |
- urpmi
o diskspace issues are now a fatal error (need perl-URPM 3.20)
(no use going on with the other transactions)
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/install.pm | 1 | ||||
-rw-r--r-- | urpm/main_loop.pm | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/urpm/install.pm b/urpm/install.pm index a688135a..39647f90 100644 --- a/urpm/install.pm +++ b/urpm/install.pm @@ -160,6 +160,7 @@ sub options { sub install { my ($urpm, $remove, $install, $upgrade, %options) = @_; $options{translate_message} = 1; + $options{raw_message} = 1; my $db = urpm::db_open_or_die_($urpm, !$options{test}); #- open in read/write mode unless testing installation. 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; |