Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 214370 - app-portage/gentoolkit-0.2.4_rc3: revdep-rebuild should display error messages at beginning of output
Summary: app-portage/gentoolkit-0.2.4_rc3: revdep-rebuild should display error message...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 170220
  Show dependency tree
 
Reported: 2008-03-23 14:01 UTC by Allen Brooker (AllenJB)
Modified: 2008-04-24 02:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
revdep-rebuild_unrecopts.patch (revdep-rebuild_unrecopts.patch,686 bytes, patch)
2008-04-05 19:02 UTC, michael@smith-li.com
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Allen Brooker (AllenJB) 2008-03-23 14:01:07 UTC
When revdep-rebuild displays error messages (eg. unrecongnized parameter), it displays it at the end of the output, below the help output. This is counter to common practice and makes the error message hard to find. I believe that the usability would be improved if the error message was displayed before the help output.

It might also be an idea not to display the entire usage output automatically for error messages at all. In my opinion, this information is easy enough to find already and "hides" the error message. Perhaps add a message along the lines of "see 'revdep-rebuild -h' for full usage information" to error messages instead.

Current output:
$ revdep-rebuild -a
Usage: revdep-rebuild [OPTIONS] [--] [EMERGE_OPTIONS]

Broken reverse dependency rebuilder.

  -C, --nocolor        Turn off colored output
  -d, --debug          Print way too much information (uses bash's set -xv)
  -e, --exact          Emerge based on exact package version
  -h, --help           Print this usage
  -i, --ignore         Ignore temporary files from previous runs
  -k, --keep-temp      Do not delete temporary files on exit
  -L, --library NAME   Emerge existing packages that use the library with NAME
      --library=NAME   NAME can be a full path to the library or a basic
                       regular expression (man grep)
  -l, --no-ld-path     Do not set LD_LIBRARY_PATH
  -o, --no-order       Do not check the build order
                       (Saves time, but may cause breakage.)
  -p, --pretend        Do a trial run without actually emerging anything
                       (also passed to emerge command)
  -P, --no-progress    Turn off the progress meter
  -q, --quiet          Be less verbose (also passed to emerge command)
  -v, --verbose        Be more verbose (also passed to emerge command)
  -u, --no-util UTIL   Do not use features provided by UTIL
      --no-util=UTIL   UTIL can be one of portage-utils or pkgcore
                       or it can be a *quoted* space-delimited list.

Calls emerge, options after -- are ignored by revdep-rebuild
and passed directly to emerge.

Report bugs to <http://bugs.gentoo.org>

Encountered unrecognized option -a.

revdep-rebuild no longer automatically passes unrecognized options to portage.
Separate emerge-only options from revdep-rebuild options with the -- flag.


Expected output:
$ revdep-rebuild -a
Encountered unrecognized option -a.

revdep-rebuild no longer automatically passes unrecognized options to portage.
Separate emerge-only options from revdep-rebuild options with the -- flag.

Usage: revdep-rebuild [OPTIONS] [--] [EMERGE_OPTIONS]

Broken reverse dependency rebuilder.

  -C, --nocolor        Turn off colored output
  -d, --debug          Print way too much information (uses bash's set -xv)
  -e, --exact          Emerge based on exact package version
  -h, --help           Print this usage
  -i, --ignore         Ignore temporary files from previous runs
  -k, --keep-temp      Do not delete temporary files on exit
  -L, --library NAME   Emerge existing packages that use the library with NAME
      --library=NAME   NAME can be a full path to the library or a basic
                       regular expression (man grep)
  -l, --no-ld-path     Do not set LD_LIBRARY_PATH
  -o, --no-order       Do not check the build order
                       (Saves time, but may cause breakage.)
  -p, --pretend        Do a trial run without actually emerging anything
                       (also passed to emerge command)
  -P, --no-progress    Turn off the progress meter
  -q, --quiet          Be less verbose (also passed to emerge command)
  -v, --verbose        Be more verbose (also passed to emerge command)
  -u, --no-util UTIL   Do not use features provided by UTIL
      --no-util=UTIL   UTIL can be one of portage-utils or pkgcore
                       or it can be a *quoted* space-delimited list.

Calls emerge, options after -- are ignored by revdep-rebuild
and passed directly to emerge.

Report bugs to <http://bugs.gentoo.org>
Comment 1 michael@smith-li.com 2008-04-05 19:02:37 UTC
Created attachment 148771 [details, diff]
revdep-rebuild_unrecopts.patch

OK, I'm down with that. How's this patch against r485, too verbose?
Comment 2 Paul Varner (RETIRED) gentoo-dev 2008-04-23 20:05:39 UTC
$ svn commit -m "Change error message to be clearer when unknown option is passed. (Bug #214370)"
Sending        revdep-rebuild/revdep-rebuild
Transmitting file data .
Committed revision 487.
Comment 3 Paul Varner (RETIRED) gentoo-dev 2008-04-24 02:32:56 UTC
Released in gentoolkit-0.2.4_rc4