summaryrefslogtreecommitdiffstats
path: root/urpm/parallel_ssh.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-08-26 21:24:02 +0000
committerFrancois Pons <fpons@mandriva.com>2002-08-26 21:24:02 +0000
commit2884d491b2e47f393085cebcdc8bcab92937f8b2 (patch)
tree976ff2e3a73ff04d7f20b14eae76112939d9f241 /urpm/parallel_ssh.pm
parent28df52a7dce6e7aee0fa1ebd2c921b8deb813170 (diff)
downloadurpmi-2884d491b2e47f393085cebcdc8bcab92937f8b2.tar
urpmi-2884d491b2e47f393085cebcdc8bcab92937f8b2.tar.gz
urpmi-2884d491b2e47f393085cebcdc8bcab92937f8b2.tar.bz2
urpmi-2884d491b2e47f393085cebcdc8bcab92937f8b2.tar.xz
urpmi-2884d491b2e47f393085cebcdc8bcab92937f8b2.zip
4.0-4mdk
Diffstat (limited to 'urpm/parallel_ssh.pm')
-rw-r--r--urpm/parallel_ssh.pm23
1 files changed, 21 insertions, 2 deletions
diff --git a/urpm/parallel_ssh.pm b/urpm/parallel_ssh.pm
index 5d0c3ea3..46a21b34 100644
--- a/urpm/parallel_ssh.pm
+++ b/urpm/parallel_ssh.pm
@@ -77,9 +77,28 @@ sub parallel_install {
system "scp $sources $_:$urpm->{cachedir}/rpms";
}
+ my (%good_nodes, $bad);
+ foreach my $node (keys %{$parallel->{nodes}}) {
+ local (*F, $_);
+ $urpm->{log}("parallel_ssh: ssh $node urpmi --no-locales --test --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line}");
+ open F, "ssh $node urpmi --no-locales --test --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line} |";
+ while ($_ = <F>) {
+ chomp;
+ /Installation is possible/ and $good_nodes{$node} = undef;
+ }
+ close F;
+ }
foreach (keys %{$parallel->{nodes}}) {
- $urpm->{log}("parallel_ssh: ssh $_ urpmi --auto --synthesis $parallel->{synthesis} $parallel->{line}");
- system "ssh $_ urpmi --auto --synthesis $parallel->{synthesis} $parallel->{line}";
+ exists $good_nodes{$_} and next;
+ $urpm->{error}(_("Installation failed on node %s", $_) . ":\n" . ""); #TODO
+ $bad = 1;
+ }
+ unless ($bad) {
+ foreach my $node (keys %{$parallel->{nodes}}) {
+ #- continue installation.
+ $urpm->{log}("parallel_ssh: ssh $node urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line}");
+ system "ssh $node urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line}";
+ }
}
}