diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-01-04 09:26:04 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-01-04 09:26:04 +0000 |
commit | a00dd7d0ab1462c98264d9fe53a31a3d1c635d23 (patch) | |
tree | abf67012a658e9dbc2bbc4d6ecb800d13f2ff9d4 /urpm.pm | |
parent | 69fb2a40b53e18b47ba58ef7cae596aa77ddb24e (diff) | |
download | urpmi-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.pm | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -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) { |