Bug 768104

Summary: yum install ignores whitespace for "@" but not "-"
Product: [Fedora] Fedora Reporter: Andrew McNabb <amcnabb>
Component: yumAssignee: Fedora Packaging Toolset Team <packaging-team>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 16CC: ffesti, james.antill, maxamillion, pmatilai, tla, zpavlas
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-02 08:43:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Andrew McNabb 2011-12-15 18:56:00 UTC
Description of problem:

The install command in yum has a parsing problem. It ignores whitespace after an "@" but not after a "-". The following simple examples demonstrate the problem in contrast with expected behavior. Note that each command supposes that the sendmail package is uninstalled when the command is run.


Commands that work as expected
------------------------------

The following command tries to reinstall sendmail (as expected) because the "core" group requires sendmail:

yum install -- "@core"

This command also works as expected (the space after the "@" is ignored):

yum install -- "@ core"

The following command tells yum not to install sendmail even though the core package requires it:

yum install -- "@ core" "-sendmail"


Command that doesn't work as expected
-------------------------------------

However, this command incorrectly tries to install sendmail:

yum install -- "@ core" "- sendmail"

Presumably it is looking for a package called " sendmail". The behavior for parsing after a "-" in yum differs both from the parsing after "@" in yum and from the parsing after "-" in kickstart scripts.

Comment 1 Zdeněk Pavlas 2011-12-19 11:33:50 UTC
> The behavior for parsing after a "-" in yum differs both from the parsing after "@" in yum and from the parsing after "-" in kickstart scripts.

Confirmed.  '-' is handled identically for groups and packages, but yum supports syntax "grp_foo,grp_bar" to select/deselect two groups at once, and then strips spaces, probably to support "grp_foo, grp_bar" as well.  This syntax is not supported for packages, so all of these don't work as well:

$ yum install/remove/whatever " sendmail"
$ yum install/remove/whatever "sendmail "
$ yum install/remove/whatever sendmail,gimp
$ yum install/remove/whatever "sendmail, gimp"

There are about 6+ uses of '.returnPackages(patterns=[arg])' idiom, where 'arg' is a command line argument.  To make the above work, this has to be changed.

Comment 2 Fedora Admin XMLRPC Client 2012-04-27 15:26:20 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.