<?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>115153</bug_id>
          
          <creation_ts>2005-12-10 21:26 0000</creation_ts>
          <short_desc>app-admin/zprod-manager-0.3 ignores  &quot;--help&quot; option</short_desc>
          <delta_ts>2006-11-05 21:28:21 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>aross@gentoo.org</reporter>
          <assigned_to>maintainer-needed@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>aross@gentoo.org</who>
            <bug_when>2005-12-10 21:26:50 0000</bug_when>
            <thetext>&quot;--help&quot; is an almost universally recognised command-line argument for displaying a program&apos;s usage 
information. However, it is ignored by zprod-manager. Usage information is only available when no 
command-line arguments are supplied, which is counter-intuitive.

Reproducible: Always
Steps to Reproduce:
1. zprod-manager --help

Actual Results:  
zprod-manager launches in interactive mode.

Expected Results:  
zprod-manager should display the same help/usage text as when zprog-manager is run without any 
command-line arguments.

Portage 2.0.51.22-r3 (hardened/x86/2.6, gcc-3.3.6, glibc-2.3.5-r2, 2.6.11-hardened-r1 i686)
===============================================================
==
System uname: 2.6.11-hardened-r1 i686 Intel(R) Celeron(R) CPU 2.40GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS=&quot;x86&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;i686-pc-linux-gnu&quot;
CFLAGS=&quot;-march=pentium4 -O2 -pipe&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/
qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/env.d&quot;
CXXFLAGS=&quot;-march=pentium4 -O2 -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig distlocks nostrip sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;ftp://mirror.aarnet.edu.au/pub/gentoo ftp://mirror.pacific.net.au/pub/gentoo 
http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo&quot;
PKGDIR=&quot;/usr/portage//packages/x86/&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage/&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage&quot;
SYNC=&quot;rsync://rsync.au.gentoo.org/gentoo-portage&quot;
USE=&quot;apache2 bash-completion berkdb bzip2 crypt dlloader expat gd hardened imagemagick jpeg 
kerberos ldap libwww mhash mysql ncurses nls pam pcre perl pic png python readline sasl ssl symlink 
tcpd tiff truetype udev unicode userlocales vhosts x86 xml xml2 zlib userland_GNU kernel_linux 
elibc_glibc&quot;
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aross@gentoo.org</who>
            <bug_when>2005-12-10 21:58:31 0000</bug_when>
            <thetext>Created an attachment (id=74469)
patch to add primitive &quot;--help&quot; support

With the patch applied, zprod-manager will dispay the help/usage text when run
with any number of command-line arguments, provided the last one is &quot;--help&quot;.
This is better than the simple solution of requiring that &quot;--help&quot; be the only
command-line argument, as it allows for people trying to get help on particular
operations by typing &quot;zprod-manager add --help&quot;.

The patch doesn&apos;t catch situations where additional arguments follow &quot;--help&quot;,
nor does it check for &quot;-h&quot; etc, but I believe it&apos;s a simple patch that
addresses the most common situations and is the best solution short of
rewriting to use getopt.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aross@gentoo.org</who>
            <bug_when>2006-11-05 21:28:21 0000</bug_when>
            <thetext>Fixed in app-admin/zprod-manager-0.3.1</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>74469</attachid>
            <date>2005-12-10 21:58 0000</date>
            <desc>patch to add primitive &quot;--help&quot; support</desc>
            <filename>zprod-manager-help.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIHpwcm9kLW1hbmFnZXIJMjAwNS0xMS0yMiAxNDo0MzoxMy4wMDAwMDAwMDAgKzExMDAKKysr
IHpwcm9kLW1hbmFnZXItaGVscAkyMDA1LTEyLTExIDE2OjQ5OjE1LjAwMDAwMDAwMCArMTEwMApA
QCAtMzI3LDEzICszMjcsMTcgQEAKIAogIyMjIE1BSU4KIAotY2FzZSAiJHsjfSIgaW4KLSAgICAw
KSBtb2RlX2hlbHAgOzsKLSAgICAxKSBtb2RlX2ludGVyYWN0aXZlICR7MX0gOzsKLSAgICAyKSBt
b2RlX2RlZmF1bHRaaW5zdCAkezF9ICR7Mn0gOzsKLSAgICAzKSBtb2RlX2V4cGxpY2l0ICR7MX0g
JHsyfSAkezN9IDs7Ci0gICAgKikgbW9kZV9oZWxwICJFcnJvcjogVG9vIG1hbnkgcGFyYW1ldGVy
cyIgOzsKLWVzYWMKK2lmIFsgJHshI30gPSAiLS1oZWxwIiBdIDsgdGhlbgorICAgIG1vZGVfaGVs
cAorZWxzZQorICAgIGNhc2UgIiR7I30iIGluCisgICAgICAgIDApIG1vZGVfaGVscCA7OworICAg
ICAgICAxKSBtb2RlX2ludGVyYWN0aXZlICR7MX0gOzsKKyAgICAgICAgMikgbW9kZV9kZWZhdWx0
Wmluc3QgJHsxfSAkezJ9IDs7CisgICAgICAgIDMpIG1vZGVfZXhwbGljaXQgJHsxfSAkezJ9ICR7
M30gOzsKKyAgICAgICAgKikgbW9kZV9oZWxwICJFcnJvcjogVG9vIG1hbnkgcGFyYW1ldGVycyIg
OzsKKyAgICBlc2FjCitmaQogCiBSRVNVTFQ9JD8KIAo=
</data>        

          </attachment>
    </bug>

</bugzilla>