summaryrefslogtreecommitdiffstats
path: root/urpm/parallel_ka_run.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-09 20:29:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-09 20:29:46 +0000
commit2011d301c5135cdd39b857df3ba9867a434111f5 (patch)
tree022087d93208d1f18ebb108e32f9214694d76fa0 /urpm/parallel_ka_run.pm
parent9049ea87250e6dfb64fced6c390a8b85ab14931f (diff)
downloadurpmi-2011d301c5135cdd39b857df3ba9867a434111f5.tar
urpmi-2011d301c5135cdd39b857df3ba9867a434111f5.tar.gz
urpmi-2011d301c5135cdd39b857df3ba9867a434111f5.tar.bz2
urpmi-2011d301c5135cdd39b857df3ba9867a434111f5.tar.xz
urpmi-2011d301c5135cdd39b857df3ba9867a434111f5.zip
enhance rshp_command() to fit its uses
Diffstat (limited to 'urpm/parallel_ka_run.pm')
-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;
}
}