summaryrefslogtreecommitdiffstats
path: root/urpm/parallel_ssh.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-12-03 14:43:51 +0000
committerFrancois Pons <fpons@mandriva.com>2002-12-03 14:43:51 +0000
commit2e05a0de40d1d5722b1b5dc50e6f59c1f6cbcfbe (patch)
tree7326808e4a91fb78b485e5686a4e2f93804ab9d4 /urpm/parallel_ssh.pm
parentc2f88b824c74e11c644bd34ca29ff4a3a216ede9 (diff)
downloadurpmi-2e05a0de40d1d5722b1b5dc50e6f59c1f6cbcfbe.tar
urpmi-2e05a0de40d1d5722b1b5dc50e6f59c1f6cbcfbe.tar.gz
urpmi-2e05a0de40d1d5722b1b5dc50e6f59c1f6cbcfbe.tar.bz2
urpmi-2e05a0de40d1d5722b1b5dc50e6f59c1f6cbcfbe.tar.xz
urpmi-2e05a0de40d1d5722b1b5dc50e6f59c1f6cbcfbe.zip
4.1-8mdk
Diffstat (limited to 'urpm/parallel_ssh.pm')
-rw-r--r--urpm/parallel_ssh.pm20
1 files changed, 12 insertions, 8 deletions
diff --git a/urpm/parallel_ssh.pm b/urpm/parallel_ssh.pm
index 22c3570e..9cc0198a 100644
--- a/urpm/parallel_ssh.pm
+++ b/urpm/parallel_ssh.pm
@@ -21,8 +21,7 @@ sub parallel_resolve_dependencies {
my ($best_requested, $best);
foreach (@$_) {
exists $state->{selected}{$_->id} and $best_requested = $_, last;
- exists $avoided{$_->name} and next;
- if ($best_requested || exists $requested{$_->id}) {
+ if ($best_requested) {
if ($best_requested && $best_requested != $_) {
$_->compare_pkg($best_requested) > 0 and $best_requested = $_;
} else {
@@ -93,7 +92,7 @@ sub parallel_resolve_dependencies {
#- parallel install.
sub parallel_install {
- my ($parallel, $urpm, $remove, $install, $upgrade) = @_;
+ my ($parallel, $urpm, $remove, $install, $upgrade, %options) = @_;
foreach (keys %{$parallel->{nodes}}) {
my $sources = join ' ', map { "'$_'" } values %$install, values %$upgrade;
@@ -119,12 +118,17 @@ sub parallel_install {
}
%bad_nodes and return;
- #- continue installation on each nodes.
- foreach my $node (keys %{$parallel->{nodes}}) {
- $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}";
+ if ($options{test}) {
+ $urpm->{error}(_("Installation is possible"));
+ 1;
+ } else {
+ my $line = $parallel->{line} . ($options{excludepath} && " --excludepath '$options{excludepath}'");
+ #- continue installation on each nodes.
+ foreach my $node (keys %{$parallel->{nodes}}) {
+ $urpm->{log}("parallel_ssh: ssh $node urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $line");
+ system "ssh $node urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $line" == 0;
+ }
}
- 1;
}