summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm/parallel_ka_run.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/urpm/parallel_ka_run.pm b/urpm/parallel_ka_run.pm
index 4b3c2277..338c86a4 100644
--- a/urpm/parallel_ka_run.pm
+++ b/urpm/parallel_ka_run.pm
@@ -26,10 +26,11 @@ if (!$rshp_command) {
$rshp_command ||= 'rshp';
sub rshp_command {
- my ($urpm, $para) = @_;
+ my ($urpm, $parallel, $rshp_option, $para) = @_;
- $urpm->{log}("parallel_ka_run: $rshp_command $para");
- "$rshp_command $para";
+ my $cmd = "$rshp_command $rshp_option $parallel->{options} -- $para";
+ $urpm->{log}("parallel_ka_run: $cmd");
+ $cmd;
}
#- parallel copy
@@ -53,7 +54,7 @@ sub parallel_find_remove {
my (%bad_nodes, %base_to_remove, %notfound);
#- now try an iteration of urpme.
- my $command = rshp_command($urpm, "-v $parallel->{options} -- urpme --no-locales --auto $test" . join(' ', map { "'$_'" } @$l));
+ my $command = rshp_command($urpm, $parallel, "-v", "urpme --no-locales --auto $test" . join(' ', map { "'$_'" } @$l));
open my $fh, "$command 2>&1 |";
while (my $s = <$fh>) {
@@ -143,7 +144,7 @@ sub parallel_resolve_dependencies {
#- the following state should be cleaned for each iteration.
delete $state->{selected};
#- now try an iteration of urpmq.
- open my $fh, rshp_command($urpm, "-v $parallel->{options} -- urpmq --synthesis $synthesis -fduc $line " . join(' ', keys %chosen)) . " |";
+ open my $fh, rshp_command($urpm, $parallel, "-v", "urpmq --synthesis $synthesis -fduc $line " . join(' ', keys %chosen)) . " |";
while (<$fh>) {
chomp;
($node, $_) = _parse_rshp_output($_) or next;
@@ -191,7 +192,7 @@ sub parallel_install {
local $_;
my ($node, %bad_nodes);
- open my $fh, rshp_command($urpm, "-v $parallel->{options} -- urpmi --pre-clean --no-locales --test --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line}") . ' |';
+ open my $fh, rshp_command($urpm, $parallel, "-v", "urpmi --pre-clean --no-locales --test --no-verify-rpm --auto --synthesis $parallel->{synthesis} $parallel->{line}") . ' |';
while (<$fh>) {
chomp;
($node, $_) = _parse_rshp_output($_) or next;
@@ -214,7 +215,7 @@ sub parallel_install {
} else {
my $line = $parallel->{line} . ($options{excludepath} ? " --excludepath '$options{excludepath}'" : "");
#- continue installation.
- system(rshp_command($urpm, "$parallel->{options} -- urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $line")) == 0;
+ system(rshp_command($urpm, $parallel, '', "urpmi --no-locales --no-verify-rpm --auto --synthesis $parallel->{synthesis} $line")) == 0;
}
}