[arch-projects] [MKINITCPIO][PATCH 2/4] Use path variables in help messages

Dave Reisner d at falconindy.com
Mon Feb 4 13:19:08 EST 2013


On Mon, Feb 04, 2013 at 06:44:00PM +0100, Sébastien Luttringer wrote:
> Signed-off-by: Sébastien Luttringer <seblu at seblu.net>
> ---
>  mkinitcpio | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mkinitcpio b/mkinitcpio
> index e932602..fb07001 100755
> --- a/mkinitcpio
> +++ b/mkinitcpio
> @@ -40,7 +40,7 @@ usage: ${0##*/} [options]
>    Options:
>     -A, --addhooks <hooks>       Add specified hooks, comma separated, to image
>     -a, --all                    Build all presets in $_d_presets
> -   -c, --config <config>        Use alternate config file. (default: /etc/mkinitcpio.conf)
> +   -c, --config <config>        Use alternate config file. (default: $_f_config)

NAK.

This only has an effect on in-tree git builds, and I expect people
hacking on mkinitcpio to be smart enough to figure this out. Worse, it
makes user options masquerade as defaults if you were to do something
like this:

$ mkinitcpio -c /dev/null -h | grep -- --config
   -c, --config <config>        Use alternate config file. (default: /dev/null)

>     -g, --generate <path>        Generate cpio image and write to specified path
>     -H, --hookhelp <hookname>    Display help for given hook and exit
>     -h, --help                   Display this message and exit
> @@ -48,7 +48,7 @@ usage: ${0##*/} [options]
>     -L, --listhooks              List all available hooks
>     -M, --automods               Display modules found via autodetection
>     -n, --nocolor                Disable colorized output messages
> -   -p, --preset <file>          Build specified preset from /etc/mkinitcpio.d
> +   -p, --preset <file>          Build specified preset from $_d_presets

Same here. Note that both of these cases are going to be a simple
relative path (either "mkinitcpio.conf" or "mkinitcpio.d") which isn't
very useful if you happen to invoke mkinitcpio from anywhere else
besides the same directory in which it resides.

Please, let's just skip this.

>     -r, --moduleroot <dir>       Root directory for modules (default: /)
>     -S, --skiphooks <hooks>      Skip specified hooks, comma-separated, during build
>     -s, --save                   Save build directory. (default: no)
> -- 
> Sébastien "Seblu" Luttringer
> 


More information about the arch-projects mailing list