From fd750c801a099c92b57c43fbab8f3e52f9b3c39f Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 30 May 2001 11:37:09 +0000 Subject: added filter to include only valid rpm filename without src arch when building an hdlist. --- urpm.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.1