Bug 768104 - yum install ignores whitespace for "@" but not "-"
Summary: yum install ignores whitespace for "@" but not "-"
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 16
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Fedora Packaging Toolset Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-15 18:56 UTC by Andrew McNabb
Modified: 2014-01-21 23:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-02 08:43:18 UTC
Type: ---


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.