Bug 1027019

Summary: show-installed -f yum outputs wrong format
Product: [Fedora] Fedora Reporter: Joel <jdy>
Component: yum-utilsAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: admiller, packaging-team-maint, tim.lauridsen, zpavlas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-11 09:02:56 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 22:45:32 UTC
show-installed -f yum
outputs the options in the wrong format.  It outputs groups and exclusions as:

@cinnamon-desktop -eog

While this matches the documention in yum manpage, it doesn't match the actual program: https://bugzilla.redhat.com/show_bug.cgi?id=1026598

What is needed is either "--exclude=eog" or a "-- -eog".

Thanks!

Comment 1 Zdeněk Pavlas 2013-11-06 11:07:17 UTC
We can add '--' at the beginning, but there's a problem that end-of-options is recognized only once. It's likely that most users that feed show-installed output to yum *already* use something like "yum <options> install -- $(cat show-installed-output)", and the following patch would break that:

--- a/show-installed.py
+++ b/show-installed.py
@@ -306,6 +306,8 @@ class ListPrinter:
             indent = ''
             separator = '\n'
         elif self.options.format == "yum":
+            # end options, so "-<pkg>" excludes work
+            self.output.write('-- ')
             indent = ''
             separator = ' '
         else:

To avoid that, I'd rather not touch the code, and suggest using "--" when using the "--format yum" option.

Comment 2 Zdeněk Pavlas 2013-11-11 09:02:56 UTC
Closing as per comment #1 and this yum-devel thread: http://lists.baseurl.org/pipermail/yum-devel/2013-November/010419.html