Bug 397190

Summary: zypper bug with file globbing
Product: [openSUSE] openSUSE 11.0 Reporter: Gary Ekker <gekker>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: matz
Version: RC 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Gary Ekker 2008-06-04 17:19:26 UTC
when entering a command like `zypper up -t package ruby*` it works fine if you are in a path where no files exist that match the expression "ruby*". 

sudo zypper up -t package ruby*
Reading installed packages...
Package 'rubygems.files.txt' is not installed.
Nothing to do.

In this case since rubygems.files.txt exists in the current working directory, the command fails.
Comment 1 Michael Matz 2008-06-04 17:27:36 UTC
Fileglobbing is done by the shell, not by zypper.  It's the same difference
for "echo bla*" depending on if the current dir contains such files or not.

non-matching globs are usually expanded to itself (and hence seen by zypper),
that can be changed by "shopt -s nullglob" in bash.

You can disable all globbing with "set -f", so that "bla*" will be given
literally to the program, not matter if a file list "blabla" exists.

Not a zypper bug.
Comment 2 Michael Schröder 2008-06-05 09:31:17 UTC
Or just quote the argument:

zypper up -t package "ruby*"