diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-10-20 12:05:33 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-10-20 12:05:33 +0000 |
commit | 157c39c7997ed7d9dd36c369e3bbd05d24a4774d (patch) | |
tree | 6e7171e8398322273d8c6776169063267ec4dbf4 | |
parent | af69c2cf94df3b8f10bae3ae32f1d03f1200ac41 (diff) | |
download | urpmi-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)
-rw-r--r-- | urpm.pm | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) { |