[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#494723: command-with-path-in-maintainer-script: misparses command



Thijs Kinkhorst <thijs@debian.org> writes:

> This is a cosmetic issue only. The test
> command-with-path-in-maintainer-script misparses the command it
> detected. See e.g. in phpmyadmin:
>
> command-with-path-in-maintainer-script
>
>     * postrm:12 /usr/sbin/lighty
>     * postinst:13 /usr/sbin/lighty
>
> While the actual command used is "/usr/sbin/lighty-enable-mod".

Thanks, fixed in Git.

> As a side note, we currently use a construct commonly advised, like this:
>                 if [ -x /usr/sbin/lighty-enable-mod ] ; then
>                         /usr/sbin/lighty-enable-mod phpmyadmin auth
>                 fi
> do you recommend to replace the part inside the if with
> `which lighty-enable-mod` then?

Yes.  The recommended construct is:

if which lighty-enable-mod >/dev/null 2>&1 ; then
    lighty-enable-mod phpmyadmin auth
fi

See also Policy 6.1.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: