diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-01-20 16:47:22 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-01-20 16:47:22 +0000 |
commit | 49005594db7e2ec0436e64da7df89d8e5d987685 (patch) | |
tree | 678829ea4262fd849159020fbfb4991fb02b40cc | |
parent | 4c786585c211b4db7eb676f5fdb6b80917815bf8 (diff) | |
download | urpmi-49005594db7e2ec0436e64da7df89d8e5d987685.tar urpmi-49005594db7e2ec0436e64da7df89d8e5d987685.tar.gz urpmi-49005594db7e2ec0436e64da7df89d8e5d987685.tar.bz2 urpmi-49005594db7e2ec0436e64da7df89d8e5d987685.tar.xz urpmi-49005594db7e2ec0436e64da7df89d8e5d987685.zip |
More error handling
-rw-r--r-- | urpm/parallel_ssh.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/urpm/parallel_ssh.pm b/urpm/parallel_ssh.pm index 01467baf..845f6c77 100644 --- a/urpm/parallel_ssh.pm +++ b/urpm/parallel_ssh.pm @@ -41,7 +41,8 @@ sub parallel_find_remove { #- now try an iteration of urpme. foreach my $node (keys %{$parallel->{nodes}}) { $urpm->{log}("parallel_ssh: ssh $node urpme --no-locales --auto $test".(join ' ', map { "'$_'" } @$l)); - open F, "ssh 2>&1 $node urpme --no-locales --auto $test".(join ' ', map { "'$_'" } @$l)." |"; + open F, "ssh 2>&1 $node urpme --no-locales --auto $test".(join ' ', map { "'$_'" } @$l)." |" + or $urpm->{fatal}(1, "Can't fork ssh: $!\n"); while (defined ($_ = <F>)) { chomp; /^\s*$/ and next; @@ -156,7 +157,8 @@ sub parallel_resolve_dependencies { #- now try an iteration of urpmq. foreach my $node (keys %{$parallel->{nodes}}) { $urpm->{ui_msg}("parallel_ssh: ssh $node urpmq --synthesis $synthesis -fduc $line ".join(' ', keys %chosen), urpm::N("Resolving dependencies on %s...", $node)); - open F, "ssh $node urpmq --synthesis $synthesis -fduc $line ".join(' ', keys %chosen)." |"; + open F, "ssh $node urpmq --synthesis $synthesis -fduc $line ".join(' ', keys %chosen)." |" + or $urpm->{fatal}(1, "Can't fork ssh: $!\n"); while (defined ($_ = <F>)) { chomp; if (my ($action, $what) = /^\@([^\@]*)\@(.*)/) { @@ -209,7 +211,8 @@ sub parallel_install { foreach my $node (keys %{$parallel->{nodes}}) { local (*F, $_); $urpm->{ui_msg}("parallel_ssh: ssh $node urpmi --pre-clean --no-locales --test --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line}", urpm::N("Verifying if install is possible on %s...", $node)); - open F, "ssh $node urpmi --pre-clean --no-locales --test --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line} |"; + open F, "ssh $node urpmi --pre-clean --no-locales --test --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line} |" + or $urpm->{fatal}(1, "Can't fork ssh: $!\n"); while ($_ = <F>) { $bad_nodes{$node} .= $_; /Installation failed/ and $bad_nodes{$node} = ''; @@ -232,7 +235,8 @@ sub parallel_install { foreach my $node (keys %{$parallel->{nodes}}) { $urpm->{ui_msg}("parallel_ssh: ssh $node urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $line", urpm::N("Performing install on %s...", $node)); $urpm->{ui}{progress}->(0) if ref $urpm->{ui}{progress}; - open F, "ssh $node urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $line |"; + open F, "ssh $node urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $line |" + or $urpm->{fatal}(1, "Can't fork ssh: $!\n"); local $/ = \1; my $log; my $last_time; |