summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-10-15 08:37:05 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-10-15 08:37:05 +0000
commitd33b7d59ec240731585ccb77e5de5f978e0dd2b5 (patch)
tree1322c9d3df57d69e17ea8942225cfaf19c09dcdf
parente7dfa89b50ddcb96dc49200da0088d784af51dac (diff)
downloadurpmi-d33b7d59ec240731585ccb77e5de5f978e0dd2b5.tar
urpmi-d33b7d59ec240731585ccb77e5de5f978e0dd2b5.tar.gz
urpmi-d33b7d59ec240731585ccb77e5de5f978e0dd2b5.tar.bz2
urpmi-d33b7d59ec240731585ccb77e5de5f978e0dd2b5.tar.xz
urpmi-d33b7d59ec240731585ccb77e5de5f978e0dd2b5.zip
- urpmi
o diskspace issues are now a fatal error (need perl-URPM 3.18.1) (no use going on with the other transactions) (backported from trunk)
-rw-r--r--NEWS4
-rw-r--r--urpm/install.pm1
-rw-r--r--urpm/main_loop.pm9
3 files changed, 12 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index e09f0130..c008e4fc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+- urpmi
+ o diskspace issues are now a fatal error (need perl-URPM 3.18.1)
+ (no use going on with the other transactions)
+
Version 6.14.4 - 14 October 2008
- urpmi.update:
diff --git a/urpm/install.pm b/urpm/install.pm
index 020fa1ad..563f3733 100644
--- a/urpm/install.pm
+++ b/urpm/install.pm
@@ -161,6 +161,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;