RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 986740 - yum list is not pipeline-friendly
Summary: yum list is not pipeline-friendly
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.6
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-22 01:55 UTC by Paul Reiber
Modified: 2014-01-21 06:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-22 06:44:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Paul Reiber 2013-07-22 01:55:33 UTC
Description of problem:

The output of 'yum list' is not pipeline-friendly.

For example, depending on what is installed and how long the package names are, one may need to "unwrap" lines like this, to get a list of installed packages from either epel or ius:

yum list installed|awk '$3 == "@epel" ||  $3 == "@ius" {print} NF == 1 {line=$0}  $2 == "@epel" || $2 == "@ius" {print line,$0}'

The above line-joining becomes necessary because some of output is formatted like this:

package-name-on-one-line
                       version-number-and   @reponame

instead of this:

package-name-on-same-line-as  version-number-and   @reponame

How reproducible:

run "yum list installed"

Steps to Reproduce:
1.  Install packages with long packagenames
2.  run "yum list installed"
3.  Note how yum wraps the information about a package onto the next line

Actual results:

package-name-on-one-line
                       version-number-and   @reponame

Expected results:

package-name-on-same-line-as  version-number-and   @reponame

Additional info:

Someone had to actually add code to get the output to wrap onto a second line, so this should be easy enough to find and remove.  It is much more important that the program be pipeline-friendly than to have it look pretty on screen.

Comment 1 Jan Zeleny 2013-07-22 06:44:28 UTC
I'm sorry to say that this RFE is not that important and thus we have no intention to implement it in RHEL6 timeframe. Also it's worth mentioning that we don't really plan for many new features to go to yum at all. Instead we want to focus on development of dnf.

However if you have a patch implementing the requested behavior, feel free to send it to us for inclusion.

Comment 2 Zdeněk Pavlas 2013-07-22 08:32:01 UTC
Use repoquery instead of "yum list".. It has more options, and the output is much better parseable.


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