summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-10 13:19:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-10 13:19:19 +0000
commit0d9aede08c37ec5b2b4fb9e19d9e2595b6c153c4 (patch)
tree360308b62673962c10ab5ff8d5ba241ead9bbe72 /urpm.pm
parentefa13359dff4f7bbef2611c5091041d236838f36 (diff)
downloadurpmi-0d9aede08c37ec5b2b4fb9e19d9e2595b6c153c4.tar
urpmi-0d9aede08c37ec5b2b4fb9e19d9e2595b6c153c4.tar.gz
urpmi-0d9aede08c37ec5b2b4fb9e19d9e2595b6c153c4.tar.bz2
urpmi-0d9aede08c37ec5b2b4fb9e19d9e2595b6c153c4.tar.xz
urpmi-0d9aede08c37ec5b2b4fb9e19d9e2595b6c153c4.zip
cleanup
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/urpm.pm b/urpm.pm
index d5f82b4e..c539e075 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -425,22 +425,23 @@ sub write_config {
sub _configure_parallel {
my ($urpm, $alias) = @_;
- my ($parallel_options, $parallel_handler);
+ my @parallel_options;
#- read parallel configuration
foreach (cat_("/etc/urpmi/parallel.cfg")) {
chomp; s/#.*$//; s/^\s*//; s/\s*$//;
/\s*([^:]*):(.*)/ or $urpm->{error}(N("unable to parse \"%s\" in file [%s]", $_, "/etc/urpmi/parallel.cfg")), next;
- $1 eq $alias and $parallel_options = ($parallel_options && "\n") . $2;
+ $1 eq $alias and push @parallel_options, $2;
}
#- if a configuration option has been found, use it; else fatal error.
- if ($parallel_options) {
+ my $parallel_handler;
+ if (@parallel_options) {
foreach my $dir (grep { -d $_ } map { "$_/urpm" } @INC) {
foreach my $pm (grep { -f $_ } glob("$dir/parallel*.pm")) {
#- load parallel modules
$urpm->{log}->(N("examining parallel handler in file [%s]", $pm));
# perl_checker: require urpm::parallel_ka_run
# perl_checker: require urpm::parallel_ssh
- eval { require $pm; $parallel_handler = $urpm->handle_parallel_options($parallel_options) };
+ eval { require $pm; $parallel_handler = $urpm->handle_parallel_options(join("\n", @parallel_options)) };
$parallel_handler and last;
}
$parallel_handler and last;