diff options
author | Francois Pons <fpons@mandriva.com> | 2002-12-13 11:18:16 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-12-13 11:18:16 +0000 |
commit | 09c2ed303d2475d08f658cba0f360b1cbc6b57b8 (patch) | |
tree | a0cd61bb5668930c9acc8e6abdd8b9e831e09b32 /urpm | |
parent | 663f63199bf2c2216952a675f411237a29f7f661 (diff) | |
download | urpmi-09c2ed303d2475d08f658cba0f360b1cbc6b57b8.tar urpmi-09c2ed303d2475d08f658cba0f360b1cbc6b57b8.tar.gz urpmi-09c2ed303d2475d08f658cba0f360b1cbc6b57b8.tar.bz2 urpmi-09c2ed303d2475d08f658cba0f360b1cbc6b57b8.tar.xz urpmi-09c2ed303d2475d08f658cba0f360b1cbc6b57b8.zip |
4.1-17mdk
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/parallel_ka_run.pm | 9 | ||||
-rw-r--r-- | urpm/parallel_ssh.pm | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/urpm/parallel_ka_run.pm b/urpm/parallel_ka_run.pm index 7fac99b6..93d90e9d 100644 --- a/urpm/parallel_ka_run.pm +++ b/urpm/parallel_ka_run.pm @@ -6,6 +6,7 @@ sub parallel_register_rpms { $urpm->{log}("parallel_ka_run: mput $parallel->{options} -- ".join(' ', @files)." $urpm->{cachedir}/rpms/"); system "mput", split(' ', $parallel->{options}), '--', @files, "$urpm->{cachedir}/rpms/"; + $? == 0 || $? == 256 or $urpm->{fatal}(1, _("mput failed, maybe a node is unreacheable")); #- keep trace of direct files. foreach (@files) { @@ -22,6 +23,7 @@ sub parallel_resolve_dependencies { #- first propagate the synthesis file to all machine. $urpm->{log}("parallel_ka_run: mput $parallel->{options} -- '$synthesis' '$synthesis'"); system "mput $parallel->{options} -- '$synthesis' '$synthesis'"; + $? == 0 || $? == 256 or $urpm->{fatal}(1, _("mput failed, maybe a node is unreacheable")); $parallel->{synthesis} = $synthesis; #- compute command line of urpm? tools. @@ -72,7 +74,7 @@ sub parallel_resolve_dependencies { chomp; s/<([^>]*)>.*:->:(.*)/$2/ and $node = $1; if (/^\@removing\@(.*)/) { - $state->{ask_remove}{$1}{$node}; + $state->{ask_remove}{$1}{$node} = undef; } elsif (/\|/) { #- distant urpmq returned a choices, check if it has already been chosen #- or continue iteration to make sure no more choices are left. @@ -93,7 +95,7 @@ sub parallel_resolve_dependencies { $state->{selected}{$pkg->id}{$node} = $_; } } - close F or $urpm->{fatal}(1, _("rshp failed")); + close F or $urpm->{fatal}(1, _("rshp failed, maybe a node is unreacheable")); #- check for internal error of resolution. $cont == 1 and die "internal distant urpmq error on choice not taken"; } while ($cont); @@ -111,6 +113,7 @@ sub parallel_install { $urpm->{log}("parallel_ka_run: mput $parallel->{options} -- ".join(' ', values %$install, values %$upgrade)." $urpm->{cachedir}/rpms/"); system "mput", split(' ', $parallel->{options}), '--', values %$install, values %$upgrade, "$urpm->{cachedir}/rpms/"; + $? == 0 || $? == 256 or $urpm->{fatal}(1, _("mput failed, maybe a node is unreacheable")); local (*F, $_); my ($node, %bad_nodes); @@ -124,7 +127,7 @@ sub parallel_install { /Installation failed/ and $bad_nodes{$node} = ''; /Installation is possible|everything already installed/ and delete $bad_nodes{$node}; } - close F or $urpm->{fatal}(1, _("rshp failed")); + close F or $urpm->{fatal}(1, _("rshp failed, maybe a node is unreacheable")); foreach (keys %{$parallel->{nodes}}) { exists $bad_nodes{$_} or next; diff --git a/urpm/parallel_ssh.pm b/urpm/parallel_ssh.pm index a135f18a..4d66b372 100644 --- a/urpm/parallel_ssh.pm +++ b/urpm/parallel_ssh.pm @@ -8,6 +8,7 @@ sub parallel_register_rpms { my $sources = join ' ', map { "'$_'" } @files; $urpm->{log}("parallel_ssh: scp $sources $_:$urpm->{cachedir}/rpms"); system "scp $sources $_:$urpm->{cachedir}/rpms"; + $? == 0 or $urpm->{fatal}(1, _("scp failed on host %s", $_)); } #- keep trace of direct files. @@ -25,6 +26,7 @@ sub parallel_resolve_dependencies { foreach (keys %{$parallel->{nodes}}) { $urpm->{log}("parallel_ssh: scp -q '$synthesis' '$_:$synthesis'"); system "scp -q '$synthesis' '$_:$synthesis'"; + $? == 0 or $urpm->{fatal}(1, _("scp failed on host %s", $_)); } $parallel->{synthesis} = $synthesis; @@ -75,7 +77,7 @@ sub parallel_resolve_dependencies { while ($_ = <F>) { chomp; if (/^\@removing\@(.*)/) { - $state->{ask_remove}{$1}{$node}; + $state->{ask_remove}{$1}{$node} = undef; } elsif (/\|/) { #- distant urpmq returned a choices, check if it has already been chosen #- or continue iteration to make sure no more choices are left. @@ -117,6 +119,7 @@ sub parallel_install { my $sources = join ' ', map { "'$_'" } values %$install, values %$upgrade; $urpm->{log}("parallel_ssh: scp $sources $_:$urpm->{cachedir}/rpms"); system "scp $sources $_:$urpm->{cachedir}/rpms"; + $? == 0 or $urpm->{fatal}(1, _("scp failed on host %s", $_)); } my %bad_nodes; |