summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-10 16:21:00 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-10 16:21:00 +0000
commit9c7623083e6b9dc7336cc1e9de1ea7cb90b08939 (patch)
tree1aa8b04c03af70d64e865110404c5299fa2b4ba2
parent53046fcdc6f505401adb0b7f42a2448f0141247a (diff)
downloadurpmi-9c7623083e6b9dc7336cc1e9de1ea7cb90b08939.tar
urpmi-9c7623083e6b9dc7336cc1e9de1ea7cb90b08939.tar.gz
urpmi-9c7623083e6b9dc7336cc1e9de1ea7cb90b08939.tar.bz2
urpmi-9c7623083e6b9dc7336cc1e9de1ea7cb90b08939.tar.xz
urpmi-9c7623083e6b9dc7336cc1e9de1ea7cb90b08939.zip
urpm_popen errors are not fatal by default on ssh, only for urpmq
-rw-r--r--urpm/parallel.pm3
-rw-r--r--urpm/parallel_ka_run.pm1
-rw-r--r--urpm/parallel_ssh.pm6
3 files changed, 8 insertions, 2 deletions
diff --git a/urpm/parallel.pm b/urpm/parallel.pm
index 32ff587a..4c44c55d 100644
--- a/urpm/parallel.pm
+++ b/urpm/parallel.pm
@@ -212,11 +212,12 @@ sub parallel_resolve_dependencies {
#- the following state should be cleaned for each iteration.
delete $state->{selected};
#- now try an iteration of urpmq.
- $parallel->urpm_popen($urpm, 'urpmq', "--synthesis $synthesis -fmc $line " . join(' ', keys %chosen), sub {
+ my @errors = $parallel->urpm_popen($urpm, 'urpmq', "--synthesis $synthesis -fmc $line " . join(' ', keys %chosen), sub {
my ($node, $s) = @_;
_parse_urpmq_output($urpm, $state, $node, $s, \$cont, \%chosen, %options);
undef;
});
+ @errors and $urpm->{fatal}(1, join("\n", @errors));
#- check for internal error of resolution.
$cont == 1 and die "internal distant urpmq error on choice not taken";
} while $cont;
diff --git a/urpm/parallel_ka_run.pm b/urpm/parallel_ka_run.pm
index c6dfd465..28102e38 100644
--- a/urpm/parallel_ka_run.pm
+++ b/urpm/parallel_ka_run.pm
@@ -56,6 +56,7 @@ sub urpm_popen {
$do->($node, $s_) and last;
}
close $fh or $urpm->{fatal}(1, N("rshp failed, maybe a node is unreacheable"));
+ ();
}
sub run_urpm_command {
diff --git a/urpm/parallel_ssh.pm b/urpm/parallel_ssh.pm
index d3b29570..23af44cc 100644
--- a/urpm/parallel_ssh.pm
+++ b/urpm/parallel_ssh.pm
@@ -73,6 +73,8 @@ sub _ssh_urpm_popen {
sub urpm_popen {
my ($parallel, $urpm, $cmd, $para, $do) = @_;
+ my @errors;
+
foreach my $node (keys %{$parallel->{nodes}}) {
my $fh = _ssh_urpm_popen($urpm, $node, $cmd, $para);
@@ -81,9 +83,11 @@ sub urpm_popen {
$urpm->{debug}("parallel_ssh: $node: received: $s") if $urpm->{debug};
$do->($node, $s) and last;
}
- close $fh or $urpm->{fatal}(1, N("host %s does not have a good version of urpmi (%d)", $node, $? >> 8));
+ close $fh or push @errors, N("%s failed on host %s (maybe it does not have a good version of urpmi?) (exit code: %d)", $cmd, $node, $? >> 8);
$urpm->{debug}("parallel_ssh: $node: $cmd finished") if $urpm->{debug};
}
+
+ @errors;
}
sub run_urpm_command {