summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-04 09:00:39 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-04 09:00:39 +0000
commit45e2221e8747c8c85f92dcc967e729be36631f6d (patch)
tree03bd2977d877daa8c31b4a2f446a80fcee8c3f31 /urpm.pm
parent4d47d8cc6b7b964147199479fbe5b3cc01f2cc6e (diff)
downloadurpmi-45e2221e8747c8c85f92dcc967e729be36631f6d.tar
urpmi-45e2221e8747c8c85f92dcc967e729be36631f6d.tar.gz
urpmi-45e2221e8747c8c85f92dcc967e729be36631f6d.tar.bz2
urpmi-45e2221e8747c8c85f92dcc967e729be36631f6d.tar.xz
urpmi-45e2221e8747c8c85f92dcc967e729be36631f6d.zip
In fact we want to load only the parallel modules.
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm9
1 files 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;