Bug 1027019 - show-installed -f yum outputs wrong format
show-installed -f yum outputs wrong format
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-11-05 17:45 EST by Joel
Modified: 2013-11-11 04:02 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-11-11 04:02:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joel 2013-11-05 17:45:32 EST
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".

Comment 1 Zdeněk Pavlas 2013-11-06 06:07:17 EST
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 = ' '

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 04:02:56 EST
Closing as per comment #1 and this yum-devel thread: http://lists.baseurl.org/pipermail/yum-devel/2013-November/010419.html

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