<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>214370</bug_id>
          
          <creation_ts>2008-03-23 14:01 0000</creation_ts>
          <short_desc>app-portage/gentoolkit-0.2.4_rc3: revdep-rebuild should display error messages at beginning of output</short_desc>
          <delta_ts>2008-04-24 02:32:56 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Portage Development</product>
          <component>Tools</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <keywords>InSVN</keywords>
          <priority>P2</priority>
          <bug_severity>trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>170220</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>gentoo-bugs@allenjb.me.uk</reporter>
          <assigned_to>tools-portage@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>gentoo-bugs@allenjb.me.uk</who>
            <bug_when>2008-03-23 14:01:07 0000</bug_when>
            <thetext>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 &quot;hides&quot; the error message. Perhaps add a message along the lines of &quot;see &apos;revdep-rebuild -h&apos; for full usage information&quot; 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&apos;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 &lt;http://bugs.gentoo.org&gt;

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&apos;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 &lt;http://bugs.gentoo.org&gt;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>michael@smith-li.com</who>
            <bug_when>2008-04-05 19:02:37 0000</bug_when>
            <thetext>Created an attachment (id=148771)
revdep-rebuild_unrecopts.patch

OK, I&apos;m down with that. How&apos;s this patch against r485, too verbose?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fuzzyray@gentoo.org</who>
            <bug_when>2008-04-23 20:05:39 0000</bug_when>
            <thetext>$ svn commit -m &quot;Change error message to be clearer when unknown option is passed. (Bug #214370)&quot;
Sending        revdep-rebuild/revdep-rebuild
Transmitting file data .
Committed revision 487.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fuzzyray@gentoo.org</who>
            <bug_when>2008-04-24 02:32:56 0000</bug_when>
            <thetext>Released in gentoolkit-0.2.4_rc4</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>148771</attachid>
            <date>2008-04-05 19:02 0000</date>
            <desc>revdep-rebuild_unrecopts.patch</desc>
            <filename>revdep-rebuild_unrecopts.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IHJldmRlcC1yZWJ1aWxkCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHJldmRlcC1yZWJ1aWxkCShyZXZp
c2lvbiA0ODUpCisrKyByZXZkZXAtcmVidWlsZAkod29ya2luZyBjb3B5KQpAQCAtMjY3LDEzICsy
NjcsMTYgQEAKIGRpZV9pbnZhbGlkX29wdGlvbigpIHsKIAkjIFdlIGNhbm5vdCB1c2UgZWVycm9y
IGFuZCBlaW5mbyBiZWNhdXNlIHRoaXMgZ2V0cyBjYWxsZWQgYmVmb3JlIGZ1bmN0aW9uLnNoIAog
CSMgaXMgc291cmNlZAotCXByaW50X3VzYWdlCiAJZWNobwogCWVjaG8gICJFbmNvdW50ZXJlZCB1
bnJlY29nbml6ZWQgb3B0aW9uICQxLiIgPiYyCiAJZWNobwogCWVjaG8gICIkQVBQX05BTUUgbm8g
bG9uZ2VyIGF1dG9tYXRpY2FsbHkgcGFzc2VzIHVucmVjb2duaXplZCBvcHRpb25zIHRvIHBvcnRh
Z2UuIgogCWVjaG8gICJTZXBhcmF0ZSBlbWVyZ2Utb25seSBvcHRpb25zIGZyb20gcmV2ZGVwLXJl
YnVpbGQgb3B0aW9ucyB3aXRoIHRoZSAtLSBmbGFnLiIKIAllY2hvCisJZWNobyAgIkZvciBleGFt
cGxlLCAkQVBQX05BTUUgLXYgLS0gLS1hc2siCisJZWNobworCWVjaG8gICJTZWUgdGhlIG1hbiBw
YWdlIG9yICRBUFBfTkFNRSAtaCBmb3IgbW9yZSBkZXRhaWwuIgorCWVjaG8KIAlleGl0IDEKIH0K
IAo=
</data>        

          </attachment>
    </bug>

</bugzilla>