From 2e779cb95cd2bef189fa042e08e2ff5e9f89969e Mon Sep 17 00:00:00 2001 From: Florent Villard Date: Fri, 31 Mar 2006 17:43:49 +0000 Subject: Do not try to guess if the given name is a package name or a file, just test if the file exists --- gurpmi.pm | 9 +++++---- 1 file 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")); -- cgit v1.2.1