"--help" is an almost universally recognised command-line argument for
displaying a program'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="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/
qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium4 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks nostrip sandbox sfperms strict"
GENTOO_MIRRORS="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"
PKGDIR="/usr/portage//packages/x86/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="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"
Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Created an attachment (id=74469) [details]
patch to add primitive "--help" 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 "--help".
This is better than the simple solution of requiring that "--help" be the only
command-line argument, as it allows for people trying to get help on particular
operations by typing "zprod-manager add --help".
The patch doesn't catch situations where additional arguments follow "--help",
nor does it check for "-h" etc, but I believe it's a simple patch that
addresses the most common situations and is the best solution short of
rewriting to use getopt.