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 | |
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
-rw-r--r-- | urpm/parallel_ka_run.pm | 9 | ||||
-rw-r--r-- | urpm/parallel_ssh.pm | 5 | ||||
-rwxr-xr-x | urpmf | 2 | ||||
-rw-r--r-- | urpmi.spec | 8 |
4 files changed, 18 insertions, 6 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; @@ -116,7 +116,7 @@ $urpm->configure(nocheck_access => 1, synthesis => $synthesis, update => $update, callback => $callback, - hdlist => $params{description} || $params{files}, + hdlist => $params{summary} || $params{description} || $params{files}, ); #- that'all! all has been done by callback above. @@ -2,7 +2,7 @@ Name: urpmi Version: 4.1 -Release: 16mdk +Release: 17mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate @@ -204,6 +204,12 @@ fi %changelog +* Fri Dec 13 2002 François Pons <fpons@mandrakesoft.com> 4.1-17mdk +- added mput or scp exit code checking. +- temporaly using hdlist file for --summary of urpmf. +- fixed perl warning (useless code which was not really useless but + by side effects in fact). + * Fri Dec 13 2002 François Pons <fpons@mandrakesoft.com> 4.1-16mdk - fixed warning message from distributed module for local rpms. - fixed bad test including a 0 for distributed install. |