Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 290569

Summary: app-admin/python-updater: Improve handling of options
Product: Gentoo Linux Reporter: DEMAINE Benoît-Pierre, aka DoubleHP <dhp_gentoo>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED OBSOLETE    
Severity: enhancement CC: pacho, rick
Priority: Lowest    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description DEMAINE Benoît-Pierre, aka DoubleHP 2009-10-26 14:23:58 UTC
moon-gen-3 ~ # python-updater -pv
python-updater -- Find & rebuild packages broken due to a python upgrade

Usage: python-updater [OPTION]

Options:
    -h, --help      Print usage
    -V, --version   Print version
    -p, --pretend   Pretend (don't do anything)
    -v, --verbose   Increase verbosity (may be specified multiple times)
    -o PYVER, --old-version PYVER
                    Set old python version to upgrade from to PYVER
    -i, --ignore-versions
                    Ignore versions when remerging packages
                    (still respects SLOTs)
    -P PM, --package-manager PM
                    Use package manager PM, where PM can be one of:
                    * portage (Default)
                    * pkgcore
                    * paludis
    -c CMD, --command CMD
                    Pipe found packages to command CMD instead of invoking package
                    manager. Only for debug and script use.
    -eCHECK --enable-CHECK
                    Enable CHECK where CHECK can be one of:
                    * eclass   (Disabled by default)
                    * pylibdir (Enabled by default)
                    * soname   (Enabled by default)
                    * manual   (Enabled by default)
    -dCHECK --disable-CHECK
                    Disable CHECK. See --enable option for a list of checks

See CHECKS section in the manpage for explanations about checks and
EXAMPLES section to learn how to use them.
unrecognised option: -pv
moon-gen-3 ~ # python-updater --enable
python-updater -- Find & rebuild packages broken due to a python upgrade

Usage: python-updater [OPTION]

Options:
    -h, --help      Print usage
    -V, --version   Print version
    -p, --pretend   Pretend (don't do anything)
    -v, --verbose   Increase verbosity (may be specified multiple times)
    -o PYVER, --old-version PYVER
                    Set old python version to upgrade from to PYVER
    -i, --ignore-versions
                    Ignore versions when remerging packages
                    (still respects SLOTs)
    -P PM, --package-manager PM
                    Use package manager PM, where PM can be one of:
                    * portage (Default)
                    * pkgcore
                    * paludis
    -c CMD, --command CMD
                    Pipe found packages to command CMD instead of invoking package
                    manager. Only for debug and script use.
    -eCHECK --enable-CHECK
                    Enable CHECK where CHECK can be one of:
                    * eclass   (Disabled by default)
                    * pylibdir (Enabled by default)
                    * soname   (Enabled by default)
                    * manual   (Enabled by default)
    -dCHECK --disable-CHECK
                    Disable CHECK. See --enable option for a list of checks

See CHECKS section in the manpage for explanations about checks and
EXAMPLES section to learn how to use them.
unrecognised option: --enable
moon-gen-3 ~ #

1: python-updater is not a student project; it is a vital part of Gentoo; so, it should comply to the standards of UNIX; standards include to allow compression of arguments "-vp" should be understood as "-v -p".

2: it says to try --enable, but does not accept it; if this option really exists, then, the way to tell about it is unclear. As mplayer user, "python-updater --enable-help" and "python-updater --enable help" were obvious to me ... but did not work either. If the feature really exists, it is not documented properly, and the phrases that tell about it are unclear. Or, it just does not exist at all, and docs should not mention it.
Comment 1 Johan Bergström 2009-10-28 15:03:53 UTC
Hey, thanks for the bug report.

Regarding 1: The command-line parser could benefit from getopts and the like. Feel free to send a patch :-)

Regarding 2: the correct usage is for instance --enable-eclass (short: -ee), not --enable by itself. If you feel that the help text is confusing, feel free to come up with something that is more explanatory.

Thanks!
Comment 2 DEMAINE Benoît-Pierre, aka DoubleHP 2009-10-28 16:05:26 UTC
You ask me to write patch, and I don't have time to do it. Thus, wontfix.

Sorry for noise. Next time I can't provide patch/fix, I won't report the bug.
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-10-30 16:04:21 UTC
(In reply to comment #2)
> You ask me to write patch, and I don't have time to do it. Thus, wontfix.

Comment #1 (which was written by a user, not by maintainer) doesn't say that writing of a patch is mandatory.

I think that handling of options can be somewhen improved...
Comment 4 Rick Jenkins 2010-06-08 17:09:27 UTC
As a small incremental improvement, it would be really helpful to be able to pass a -q option to emerge. This will avoid having all the interesting output scrolled out of the buffer.  
Comment 5 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-08 17:24:14 UTC
(In reply to comment #4)

You can already do it:
python-updater -- -q
Comment 6 Rick Jenkins 2010-06-08 17:32:47 UTC
Thanks, Arfrever, I stupidly failed to notice that in the man file.