summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-05-30 11:37:09 +0000
committerFrancois Pons <fpons@mandriva.com>2001-05-30 11:37:09 +0000
commitfd750c801a099c92b57c43fbab8f3e52f9b3c39f (patch)
tree109587bef9235a25070c29c2519cc69abd4ebb3c
parent7206ec1e058eee304bcda3f1a83728f7c51cc4bb (diff)
downloadurpmi-fd750c801a099c92b57c43fbab8f3e52f9b3c39f.tar
urpmi-fd750c801a099c92b57c43fbab8f3e52f9b3c39f.tar.gz
urpmi-fd750c801a099c92b57c43fbab8f3e52f9b3c39f.tar.bz2
urpmi-fd750c801a099c92b57c43fbab8f3e52f9b3c39f.tar.xz
urpmi-fd750c801a099c92b57c43fbab8f3e52f9b3c39f.zip
added filter to include only valid rpm filename without src arch when building
an hdlist.
-rw-r--r--urpm.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index ac5f081b..470d45d5 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -462,7 +462,10 @@ sub update_media {
#- try to find rpm files, use recursive method, added additional
#- / after dir to make sure it will be taken into account if this
#- is a symlink to a directory.
- @files = split "\n", `find '$dir/' -name "*.rpm" -print`;
+ #- make sure rpm filename format is correct and is not a source rpm
+ #- which are not well managed by urpmi.
+ @files = grep { /.*\/([^\/]*)-([^-]*)-([^-]*)\.([^\.]*)\.rpm/ && $4 ne "src" }
+ split "\n", `find '$dir/' -name "*.rpm" -print`;
#- check files contains something good!
if (@files > 0) {