diff options
author | Florent Villard <warly@mandriva.com> | 2006-03-31 17:43:49 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2006-03-31 17:43:49 +0000 |
commit | 2e779cb95cd2bef189fa042e08e2ff5e9f89969e (patch) | |
tree | 4d5c3be3c07136c877b1361a7a48c5d724135745 | |
parent | 807dcbe5600e645afaeca500ec6bbc63d743eb28 (diff) | |
download | urpmi-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
-rw-r--r-- | gurpmi.pm | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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")); |