diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-10 12:16:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-10 12:16:52 +0000 |
commit | 33b98d0d9ef1964a85ae3aa0ecd74b874f980281 (patch) | |
tree | 72e91bdec6ba68e9de4ce7119ac5d3721bdaf2c8 /urpm/parallel_ssh.pm | |
parent | f3d768e69f427e8216908f4cc0ac8a96574d1e68 (diff) | |
download | urpmi-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_ssh.pm')
-rw-r--r-- | urpm/parallel_ssh.pm | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/urpm/parallel_ssh.pm b/urpm/parallel_ssh.pm index 23819374..e70ff41e 100644 --- a/urpm/parallel_ssh.pm +++ b/urpm/parallel_ssh.pm @@ -81,6 +81,14 @@ sub urpm_popen { } } +sub run_urpm_command { + my ($parallel, $urpm, $cmd, $para) = @_; + + foreach my $node (keys %{$parallel->{nodes}}) { + system(_ssh_urpm($urpm, $node, $cmd, $para)); + } +} + #- parallel install. sub parallel_install { my ($parallel, $urpm, undef, $install, $upgrade, %options) = @_; @@ -110,10 +118,7 @@ sub parallel_install { } else { my $line = $parallel->{line} . ($options{excludepath} ? " --excludepath '$options{excludepath}'" : ""); #- continue installation on each node - foreach my $node (keys %{$parallel->{nodes}}) { - my $command = _ssh_urpm($urpm, $node, 'urpmi', "--no-verify-rpm --auto --synthesis $parallel->{synthesis} $line"); - system($command); - } + run_urpm_command($parallel, $urpm, 'urpmi', "--no-verify-rpm --auto --synthesis $parallel->{synthesis} $line"); } } |