diff options
author | Francois Pons <fpons@mandriva.com> | 2002-08-26 21:24:02 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-08-26 21:24:02 +0000 |
commit | 2884d491b2e47f393085cebcdc8bcab92937f8b2 (patch) | |
tree | 976ff2e3a73ff04d7f20b14eae76112939d9f241 /urpm/parallel_ka_run.pm | |
parent | 28df52a7dce6e7aee0fa1ebd2c921b8deb813170 (diff) | |
download | urpmi-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_ka_run.pm')
-rw-r--r-- | urpm/parallel_ka_run.pm | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/urpm/parallel_ka_run.pm b/urpm/parallel_ka_run.pm index dacc1056..ef806b6b 100644 --- a/urpm/parallel_ka_run.pm +++ b/urpm/parallel_ka_run.pm @@ -52,7 +52,7 @@ sub parallel_resolve_dependencies { $state->{selected}{$pkg->id}{$node} = $_; } } - close F or $urpm->{fatal}(1, _("host %s does not have a good version of urpmi", $node)); + close F or $urpm->{fatal}(1, _("rshp failed")); #- check for internal error of resolution. $cont == 1 and die "internal distant urpmq error on choice not taken"; } while ($cont); @@ -74,8 +74,27 @@ sub parallel_install { system "mput $parallel->{options} -- '$_' $urpm->{cachedir}/rpms/$basename"; } - $urpm->{log}("parallel_ka_run: rshp -v $parallel->{options} -- urpmi --synthesis $parallel->{synthesis} $parallel->{line}"); - system "rshp -v $parallel->{options} -- urpmi --auto --synthesis $parallel->{synthesis} $parallel->{line}"; + local (*F, $_); + my ($node, %good_nodes, $bad); + $urpm->{log}("parallel_ka_run: rshp -v $parallel->{options} -- urpmi --no-locales --test --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line}"); + open F, "rshp -v $parallel->{options} -- urpmi --no-locales --test --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line} |"; + while ($_ = <F>) { + chomp; + s/<([^>]*)>.*:->:(.*)/$2/ and $node = $1; + /Installation is possible/ and $good_nodes{$node} = undef; + } + close F or $urpm->{fatal}(1, _("rshp failed")); + + foreach (keys %{$parallel->{nodes}}) { + exists $good_nodes{$_} and next; + $urpm->{error}(_("Installation failed on node %s", $_) . ":\n" . ""); #TODO + $bad = 1; + } + unless ($bad) { + #- continue installation. + $urpm->{log}("parallel_ka_run: rshp $parallel->{options} -- urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line}"); + system "rshp $parallel->{options} -- urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line}"; + } } |