Bug 1026598

Summary: yum install @somegroup -somepackage causes error
Product: [Fedora] Fedora Reporter: Joel <jdy>
Component: yumAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 20CC: admiller, ffesti, firas.alkafri, packaging-team-maint, robatino, zpavlas
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yum-3.4.3-120.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-10 06:12:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joel 2013-11-05 03:25:05 UTC
Description of problem:

According to the yum man page, "yum install @somegroup -somepackage" should exclude somepackage from install.  This is the output expected by "show-installed -f yum" from yum-utils.

For example, 

yum install @cinnamon-desktop -eog 

should work according to the man page, however instead it gives the following error:

CRITICAL:yum.cli:Command line error: option -e: invalid integer value: 'og'

Work around is to use "--exclude=" instead of "-".

This bug is at minimum an error in the man pages.  If it is only a bug in the man-page then this bug should be reassigned to yum-utils and the show-installed script's yum output mode should be modded to use "--exclude=" instead of "-".

yum version: 3.4.3 on FC20 Beta RC2 (also fedora 18).

Comment 1 Zdeněk Pavlas 2013-11-05 09:48:41 UTC
There's a name clash with -e <errorlevel> option that expects an integer argument.  You can't exclude packages starting with letters "cRdex" (all Yum one-letter options with an argument).  However, the following works:

yum install @cinnamon-desktop -- -eog

In theory we could change the Yum's option parser that options are recognized only before first positional argument, but that would break lots of use cases, so I'm sure we won't do that.

Comment 2 Joel 2013-11-05 22:46:08 UTC
Thanks for information on the -- flag.  

Please re-open this bug as a bug against the manpages for yum.  The "--" option is not mentioned in the man pages except for a different usage under the swap command.

I have opened bug https://bugzilla.redhat.com/show_bug.cgi?id=1027019 against yum-utils.

Comment 3 Zdeněk Pavlas 2013-11-06 08:19:14 UTC
"--" is not a yum option, it's just a commonly used convention to mark "end of options" to resolve such argument/option ambiguity. Yum uses the optparse module, and AFAIK this has "--" support built-in and it can't be disabled. 

$ man rm

       To  remove a file whose name starts with a `-', for example `-foo', use
       one of these commands:

              rm -- -foo

Probably, we should document it in Yum, too.

Comment 4 Fedora Update System 2013-12-04 16:32:35 UTC
yum-3.4.3-119.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/yum-3.4.3-119.fc19

Comment 5 Fedora Update System 2013-12-04 16:34:59 UTC
yum-3.4.3-119.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/yum-3.4.3-119.fc20

Comment 6 Fedora Update System 2013-12-05 00:38:57 UTC
Package yum-3.4.3-119.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing yum-3.4.3-119.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-22706/yum-3.4.3-119.fc20
then log in and leave karma (feedback).

Comment 7 Andre Robatino 2013-12-05 04:36:19 UTC
With yum-3.4.3-119.fc20, I am now seeing for the first time in F20 behavior that has been in Rawhide for a while, namely if you do something like "yum install @kde-desktop" you see "Warning: group kde-desktop does not exist." Despite this, I think it's doing the right thing, since once it did install several KDE-related packages. The warning happens even if I use the full name "kde-desktop-environment" shown by "yum -v grouplist". Is this a (different) bug? If not, what is the expected syntax that will not generate the warning?

Comment 8 Fedora Update System 2013-12-06 14:25:01 UTC
yum-3.4.3-120.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/yum-3.4.3-120.fc19

Comment 9 Fedora Update System 2013-12-06 14:33:17 UTC
yum-3.4.3-120.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/yum-3.4.3-120.fc20

Comment 10 Fedora Update System 2013-12-10 06:12:18 UTC
yum-3.4.3-120.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2013-12-14 03:30:48 UTC
yum-3.4.3-120.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.