From 45e2221e8747c8c85f92dcc967e729be36631f6d Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 4 Nov 2004 09:00:39 +0000 Subject: In fact we want to load only the parallel modules. --- urpm.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/urpm.pm b/urpm.pm index b339c1ff..7bb74808 100644 --- a/urpm.pm +++ b/urpm.pm @@ -394,8 +394,7 @@ sub configure { if ($options{parallel}) { my ($parallel_options, $parallel_handler); - #- handle parallel configuration, examine all module available that - #- will handle the parallel mode (configuration is /etc/urpmi/parallel.cfg). + #- read parallel configuration local $_; open my $parallel, "/etc/urpmi/parallel.cfg"; while (<$parallel>) { @@ -404,12 +403,12 @@ sub configure { $1 eq $options{parallel} and $parallel_options = ($parallel_options && "\n") . $2; } close $parallel; - #- if a configuration options has been found, use it else fatal error. + #- if a configuration option has been found, use it; else fatal error. if ($parallel_options) { foreach my $dir (grep { -d $_ } map { "$_/urpm" } @INC) { opendir my $dh, $dir or die $!; - while (defined ($_ = readdir $dh)) { - /\.pm$/ && -f "$dir/$_" or next; + while (defined ($_ = readdir $dh)) { #- load parallel modules + /parallel.*\.pm$/ && -f "$dir/$_" or next; $urpm->{log}->(N("examining parallel handler in file [%s]", "$dir/$_")); eval { require "$dir/$_"; $parallel_handler = $urpm->handle_parallel_options($parallel_options) }; $parallel_handler and last; -- cgit v1.2.1