Bug 164021 - "rpm --last p" gives mis-formatted help
"rpm --last p" gives mis-formatted help
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2005-07-22 18:40 EDT by John Levon
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-05 07:52:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch (491 bytes, patch)
2005-07-27 16:57 EDT, Paul Nasrat
no flags Details | Diff

  None (edit)
Description John Levon 2005-07-22 18:40:51 EDT
Description of problem:

Type "rpm --last p" and you get option help, but it's mis-formatted:

$ rpm --last p
[--without=<option>]                          ption>]
Usage:                                        rpm [-aKfgpWHqV] [-aKfgpWHqVcdils]
[-aKfgpWHqVcdilsaKfgpWHqV] [-aKfgpWHqVcdilsaKfgpWHqV] [-aKfgpWHqVcdilsaKfgpWHqV]
[-aKfgpWHqVcdilsaKfgpWHqVK] [-aKfgpWHqVcdilsaKfgpWHqVK]
[-aKfgpWHqVcdilsaKfgpWHqVKi] [-aKfgpWHqVcdilsaKfgpWHqVKiv]
[-aKfgpWHqVcdilsaKfgpWHqVKiv] [-aKfgpWHqVcdilsaKfgpWHqVKiv?] [-a|--all]
[-f|--file] [-g|--group]
This                                          program may be freely
redistributed under the terms of the GNU GPL
[--specfile]                                  ecfile] [--triggeredby]
[--whatrequires] [--whatprovides]
RPM                                           version 4.4.1

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

Comment 1 Paul Nasrat 2005-07-27 16:57:22 EDT
Created attachment 117212 [details]

This is due to last being a popt alias which we use pipe (see rpmpopt-4.4.1)

sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf("%-45s %-s\n", $1,

This should be going to stderr not stdout.
Comment 2 Paul Nasrat 2005-07-27 17:22:52 EDT
Output with above patch.

rpm --last p
RPM version 4.4.2
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL

Usage: rpm [-aKfgpWHqV] [-aKfgpWHqVcdils] [-aKfgpWHqVcdilsaKfgpWHqV]
[-aKfgpWHqVcdilsaKfgpWHqV] [-aKfgpWHqVcdilsaKfgpWHqV]
[-aKfgpWHqVcdilsaKfgpWHqVK] [-aKfgpWHqVcdilsaKfgpWHqVK]
[-aKfgpWHqVcdilsaKfgpWHqVKi] [-aKfgpWHqVcdilsaKfgpWHqVKiv]
[-aKfgpWHqVcdilsaKfgpWHqVKiv] [-aKfgpWHqVcdilsaKfgpWHqVKiv?] [-a|--all]
[-f|--file] [-g|--group]
        [-p|--package] [-W|--ftswalk] [--pkgid] [--hdrid] [--fileid]
        [--specfile] [--triggeredby] [--whatrequires] [--whatprovides]
        [--nomanifest] [-c|--configfiles] [-d|--docfiles] [--dump] [-l|--list]
        [--queryformat=QUERYFORMAT] [-s|--state] [--nomd5] [--nofiles]
        [--nodeps] [--noscript] [--comfollow] [--logical] [--nochdir]
        [--nostat] [--physical] [--seedot] [--xdev] [--whiteout]
        [--addsign] [-K|--checksig] [--delsign] [--import] [--resign]
        [--nodigest] [--nosignature] [--initdb] [--rebuilddb] [--aid]
        [--allfiles] [--allmatches] [--badreloc] [-e|--erase <package>+]
        [--excludedocs] [--excludepath=<path>] [--fileconflicts] [--force]
        [-F|--freshen <packagefile>+] [-h|--hash] [--ignorearch] [--ignoreos]
        [--ignoresize] [-i|--install] [--justdb] [--nodeps] [--nomd5]
        [--nocontexts] [--noorder] [--nosuggest] [--noscripts]
        [--notriggers] [--oldpackage] [--percent] [--prefix=<dir>]
        [--relocate=<old>=<new>] [--repackage] [--replacefiles]
        [--replacepkgs] [--test] [-U|--upgrade <packagefile>+]
        [-D|--define 'MACRO EXPR'] [-E|--eval 'EXPR'] [--macros=<FILE:...>]
        [--nodigest] [--nosignature] [--rcfile=<FILE:...>] [-r|--root ROOT]
        [--querytags] [--showrc] [--quiet] [-v|--verbose] [--version]
        [-?|--help] [--usage] [--scripts] [--setperms] [--setugids]
        [--conflicts] [--obsoletes] [--provides] [--requires] [--info]
        [--changelog] [--xml] [--triggers] [--last] [--filesbypkg]
        [--fileclass] [--filecolor] [--filecontext] [--fscontext]
        [--recontext] [--fileprovide] [--filerequire] [--redhatprovides]
        [--redhatrequires] [--buildpolicy=<policy>] [--with=<option>]
Comment 3 Paul Nasrat 2005-07-27 17:26:29 EDT

Any reason why we're using stdout here, stderr seems reasonable.
Comment 4 Jeff Johnson 2006-08-05 07:52:30 EDT
The only reason to use stdout rather than stderr that I can think of is so that
    rpm p | more
could be used for the CLI challenged.

FIxed in cvs, will be in rpm-4.4.7.

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