summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm')
-rw-r--r--urpm/parallel_ka_run.pm14
-rw-r--r--urpm/parallel_ssh.pm20
2 files changed, 22 insertions, 12 deletions
diff --git a/urpm/parallel_ka_run.pm b/urpm/parallel_ka_run.pm
index 4d44e2ac..10f29d66 100644
--- a/urpm/parallel_ka_run.pm
+++ b/urpm/parallel_ka_run.pm
@@ -91,7 +91,7 @@ sub parallel_resolve_dependencies {
#- parallel install.
sub parallel_install {
- my ($parallel, $urpm, $remove, $install, $upgrade) = @_;
+ my ($parallel, $urpm, $remove, $install, $upgrade, %options) = @_;
$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/";
@@ -116,9 +116,15 @@ sub parallel_install {
}
%bad_nodes and return;
- #- 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}") == 0;
+ if ($options{test}) {
+ $urpm->{error}(_("Installation is possible"));
+ 1;
+ } else {
+ my $line = $parallel->{line} . ($options{excludepath} && " --excludepath '$options{excludepath}'");
+ #- continue installation.
+ $urpm->{log}("parallel_ka_run: rshp $parallel->{options} -- urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $line");
+ system("rshp $parallel->{options} -- urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $line") == 0;
+ }
}
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;
}