summaryrefslogtreecommitdiffstats
path: root/gurpmi.pm
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2006-03-31 17:43:49 +0000
committerFlorent Villard <warly@mandriva.com>2006-03-31 17:43:49 +0000
commit2e779cb95cd2bef189fa042e08e2ff5e9f89969e (patch)
tree4d5c3be3c07136c877b1361a7a48c5d724135745 /gurpmi.pm
parent807dcbe5600e645afaeca500ec6bbc63d743eb28 (diff)
downloadurpmi-2e779cb95cd2bef189fa042e08e2ff5e9f89969e.tar
urpmi-2e779cb95cd2bef189fa042e08e2ff5e9f89969e.tar.gz
urpmi-2e779cb95cd2bef189fa042e08e2ff5e9f89969e.tar.bz2
urpmi-2e779cb95cd2bef189fa042e08e2ff5e9f89969e.tar.xz
urpmi-2e779cb95cd2bef189fa042e08e2ff5e9f89969e.zip
Do not try to guess if the given name is a package name or a file, just test if the file exists
Diffstat (limited to 'gurpmi.pm')
-rw-r--r--gurpmi.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/gurpmi.pm b/gurpmi.pm
index 6c670e87..16a369c2 100644
--- a/gurpmi.pm
+++ b/gurpmi.pm
@@ -75,11 +75,12 @@ sub parse_command_line {
/^--?[hv?]/ and usage();
fatal(N("Unknown option %s", $_));
}
- if (/^[-a-zA-Z0-9_+]+\z/) { # is this an rpm name ?
- push @names, $_;
- } else { # assume it's a filename
- push @all_rpms, $_;
+ if (-f) {
+ push @all_rpms, $_
+ } else {
+ push @names, $_
}
+
}
$options{'auto-select'} || @all_rpms + @names
or fatal(N("No packages specified"));