summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-01-04 09:26:04 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-01-04 09:26:04 +0000
commita00dd7d0ab1462c98264d9fe53a31a3d1c635d23 (patch)
treeabf67012a658e9dbc2bbc4d6ecb800d13f2ff9d4 /urpm.pm
parent69fb2a40b53e18b47ba58ef7cae596aa77ddb24e (diff)
downloadurpmi-a00dd7d0ab1462c98264d9fe53a31a3d1c635d23.tar
urpmi-a00dd7d0ab1462c98264d9fe53a31a3d1c635d23.tar.gz
urpmi-a00dd7d0ab1462c98264d9fe53a31a3d1c635d23.tar.bz2
urpmi-a00dd7d0ab1462c98264d9fe53a31a3d1c635d23.tar.xz
urpmi-a00dd7d0ab1462c98264d9fe53a31a3d1c635d23.zip
Speed and space optimisation when retrieving list of rpm files for a media.
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm18
1 files changed, 11 insertions, 7 deletions
diff --git a/urpm.pm b/urpm.pm
index 9250f8dc..31fdbc28 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -1348,13 +1348,17 @@ this could happen if you mounted manually the directory when creating the medium
}
}
} else {
- File::Find::find(
- {
- wanted => sub { -f $_ && /\.rpm$/ and push @files, "$File::Find::dir/$_" },
- follow => 1,
- },
- $dir,
- );
+ {
+ my %f;
+ File::Find::find(
+ {
+ wanted => sub { -f $_ && /\.rpm$/ and $f{"$File::Find::dir/$_"} = 1 },
+ follow_fast => 1,
+ },
+ $dir,
+ );
+ push @files, keys %f;
+ }
#- check files contains something good!
if (@files > 0) {