summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-10-20 12:05:33 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-10-20 12:05:33 +0000
commit157c39c7997ed7d9dd36c369e3bbd05d24a4774d (patch)
tree6e7171e8398322273d8c6776169063267ec4dbf4 /urpm.pm
parentaf69c2cf94df3b8f10bae3ae32f1d03f1200ac41 (diff)
downloadurpmi-157c39c7997ed7d9dd36c369e3bbd05d24a4774d.tar
urpmi-157c39c7997ed7d9dd36c369e3bbd05d24a4774d.tar.gz
urpmi-157c39c7997ed7d9dd36c369e3bbd05d24a4774d.tar.bz2
urpmi-157c39c7997ed7d9dd36c369e3bbd05d24a4774d.tar.xz
urpmi-157c39c7997ed7d9dd36c369e3bbd05d24a4774d.zip
Use File::Find (which is in perl-base)
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index 0c55331a..2920ae73 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -4,6 +4,7 @@ package urpm;
use strict;
use MDK::Common;
+use File::Find ();
use urpm::msg;
use urpm::download;
use urpm::util;
@@ -1246,7 +1247,9 @@ this could happen if you mounted manually the directory when creating the medium
#- is a symlink to a directory.
#- make sure rpm filename format is correct and is not a source rpm
#- which are not well managed by urpmi.
- @files = split "\n", `find '$dir/' -name "*.rpm" -print`;
+ File::Find::find { wanted => sub {
+ -f && /\.rpm$/ && push @files, "$File::Find::dir/$_"
+ } }, $dir;
#- check files contains something good!
if (@files > 0) {