Bug 164021 - "rpm --last p" gives mis-formatted help
Summary: "rpm --last p" gives mis-formatted help
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-22 22:40 UTC by John Levon
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-08-05 11:52:30 UTC
Type: ---
Embargoed:


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

Description John Levon 2005-07-22 22:40:51 UTC
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):

rpm-4.4.1-22

Comment 1 Paul Nasrat 2005-07-27 20:57:22 UTC
Created attachment 117212 [details]
patch

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,
substr($0,length($1)+2))}'

This should be going to stderr not stdout.

Comment 2 Paul Nasrat 2005-07-27 21:22:52 UTC
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>]
        [--without=<option>]


Comment 3 Paul Nasrat 2005-07-27 21:26:29 UTC
Jeff

Any reason why we're using stdout here, stderr seems reasonable.

Comment 4 Jeff Johnson 2006-08-05 11:52:30 UTC
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.