Bug 498474 - sort output of installed-rpms (sos_commands/rpm/rpm_-qa_--qf_NAME_-_VERSION_-_RELEASE_-_ARCH) for better readability
Summary: sort output of installed-rpms (sos_commands/rpm/rpm_-qa_--qf_NAME_-_VERSION_-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sos
Version: 5.4
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Adam Stokes
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks: 585923
TreeView+ depends on / blocked
 
Reported: 2009-04-30 16:32 UTC by Chris Marcantonio
Modified: 2010-04-26 13:02 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
As part of its report, sos lists the packages installed on the system. Previously, sos stored these in the order that they were provided by the rpm -qa command. Now, sos sorts the packages into alphabetical order as it compiles its list. Listing the packages alphabetically makes it easier to find packages visually, and groups some related packages together.
Clone Of:
: 585923 (view as bug list)
Environment:
Last Closed: 2009-09-02 07:32:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch I generated detailing the one line change to pipe to sort (998 bytes, patch)
2009-04-30 16:32 UTC, Chris Marcantonio
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1418 0 normal SHIPPED_LIVE sos bug fix and enhancement update 2009-09-02 07:29:42 UTC

Description Chris Marcantonio 2009-04-30 16:32:20 UTC
Created attachment 341955 [details]
patch I generated detailing the one line change to pipe to sort

Description of problem:

Currently sosreport collected all installed rpms on a system and writes them to a file.  This is (obviously) useful in a bunch of situations.  I personally often find myself searching for a specific package to see if a customer has more than one of the same package installed.  In the current collection of this file, sos basically collects rpm -qa output and pipes it to a file.  This is fine...and it's easy enough to grep through the file for what I want, but I think a small improvement (with no negative impact I can find) would be to pipe this output to sort before writing it to a file so that when viewing the whole file in a text editor, packages of the same name will appear right next to each other in the list...as well as making it easier to navigate to the section of the file where you expect a specific rpm to exist.


Version-Release number of selected component (if applicable):

# rpm -q sos
sos-1.7-9.16.el5


How reproducible:

Easily and every time.


Steps to Reproduce:
1. run sosreport and make sure the rpm plugin is executed
2. view installed-rpms (which is a symlink to sos_commands/rpm/rpm_-qa_--qf_NAME_-_VERSION_-_RELEASE_-_ARCH)
3.
  

Actual results:

File format is unsorted and random, based only on the order of packages that rpm -qa returns


Expected results:

This is more an RFE than a bug per se, so this behavior is expected right now.  It's more a minor usability improvement that I think helps in certain situations.  So in that regard, "expected" would be for this output to be sorted by package name.


Additional info:

I can't see any advantage to leaving the output of rpm -qa unsorted, mainly because I don't think there is any useful info that can be gleaned from it's ordering.  If I'm missing something obviously useful here, let me know.  Otherwise, the only negative impact I can see of this change is the brief fraction of a second it takes to pipe the output to the sort command in execution time.

Comment 6 Ruediger Landmann 2009-09-02 05:08:32 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
As part of its report, sos lists the packages installed on the system. Previously, sos stored these in the order that they were provided by the rpm -qa command. Now, sos sorts the packages into alphabetical order as it compiles its list. Listing the packages alphabetically makes it easier to find packages visually, and groups some related packages together.

Comment 7 errata-xmlrpc 2009-09-02 07:32:57 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1418.html


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