diff options
-rw-r--r-- | urpm/parallel_ka_run.pm | 17 | ||||
-rw-r--r-- | urpm/parallel_ssh.pm | 6 |
2 files changed, 13 insertions, 10 deletions
diff --git a/urpm/parallel_ka_run.pm b/urpm/parallel_ka_run.pm index 6e073134..17e47800 100644 --- a/urpm/parallel_ka_run.pm +++ b/urpm/parallel_ka_run.pm @@ -2,6 +2,7 @@ package urpm::parallel_ka_run; use strict; +(our $VERSION) = q$Id$ =~ /(\d+\.\d+)/; our $mput_command = 'mput'; our $rshp_command = 'rshp'; @@ -233,15 +234,15 @@ sub parallel_install { } } -#- allow bootstrap from urpmi code directly (namespace is urpm). +#- allow to bootstrap from urpmi code directly (namespace is urpm). + package urpm; + sub handle_parallel_options { my ($urpm, $options) = @_; my ($media, $ka_run_options) = $options =~ /ka-run(?:\(([^\)]*)\))?:(.*)/; - if ($ka_run_options) { my ($flush_nodes, %nodes); - foreach (split ' ', $ka_run_options) { if ($_ eq '-m') { $flush_nodes = 1; @@ -250,14 +251,12 @@ sub handle_parallel_options { undef $flush_nodes; } } - return bless { - media => $media, - options => $ka_run_options, - nodes => \%nodes, - }, "urpm::parallel_ka_run"; + media => $media, + options => $ka_run_options, + nodes => \%nodes, + }, "urpm::parallel_ka_run"; } - return undef; } diff --git a/urpm/parallel_ssh.pm b/urpm/parallel_ssh.pm index b95cc3ec..088804c6 100644 --- a/urpm/parallel_ssh.pm +++ b/urpm/parallel_ssh.pm @@ -3,6 +3,8 @@ package urpm::parallel_ssh; use strict; use Time::HiRes qw(gettimeofday); +(our $VERSION) = q$Id$ =~ /(\d+\.\d+)/; + sub _localhost { $_[0] eq 'localhost' } sub _nolock { &_localhost ? '--nolock ' : '' } sub _ssh { &_localhost ? '' : "ssh $_[0] " } @@ -278,8 +280,10 @@ sub parallel_install { } } -#- allow bootstrap from urpmi code directly (namespace is urpm). +#- allow to bootstrap from urpmi code directly (namespace is urpm). + package urpm; + sub handle_parallel_options { my (undef, $options) = @_; my ($id, @nodes) = split /:/, $options; |