summaryrefslogtreecommitdiffstats
path: root/urpm/parallel_ka_run.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-10 12:16:52 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-10 12:16:52 +0000
commit33b98d0d9ef1964a85ae3aa0ecd74b874f980281 (patch)
tree72e91bdec6ba68e9de4ce7119ac5d3721bdaf2c8 /urpm/parallel_ka_run.pm
parentf3d768e69f427e8216908f4cc0ac8a96574d1e68 (diff)
downloadurpmi-33b98d0d9ef1964a85ae3aa0ecd74b874f980281.tar
urpmi-33b98d0d9ef1964a85ae3aa0ecd74b874f980281.tar.gz
urpmi-33b98d0d9ef1964a85ae3aa0ecd74b874f980281.tar.bz2
urpmi-33b98d0d9ef1964a85ae3aa0ecd74b874f980281.tar.xz
urpmi-33b98d0d9ef1964a85ae3aa0ecd74b874f980281.zip
move code into run_urpm_command()
Diffstat (limited to 'urpm/parallel_ka_run.pm')
-rw-r--r--urpm/parallel_ka_run.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/urpm/parallel_ka_run.pm b/urpm/parallel_ka_run.pm
index 4352cd00..420921f2 100644
--- a/urpm/parallel_ka_run.pm
+++ b/urpm/parallel_ka_run.pm
@@ -54,6 +54,11 @@ sub urpm_popen {
close $fh or $urpm->{fatal}(1, N("rshp failed, maybe a node is unreacheable"));
}
+sub run_urpm_command {
+ my ($parallel, $urpm, $cmd, $para) = @_;
+ system(_rshp_urpm($parallel, $urpm, '', $cmd, $para)) == 0;
+}
+
sub copy_to_dir { &_run_mput }
sub propagate_file {
@@ -99,7 +104,7 @@ sub parallel_install {
} else {
my $line = $parallel->{line} . ($options{excludepath} ? " --excludepath '$options{excludepath}'" : "");
#- continue installation.
- system(_rshp_urpm($parallel, $urpm, '', 'urpmi', "--no-verify-rpm --auto --synthesis $parallel->{synthesis} $line")) == 0;
+ run_urpm_command($parallel, $urpm, 'urpmi', "--no-verify-rpm --auto --synthesis $parallel->{synthesis} $line");
}
}