On 22 September 2016 at 10:33, <zhe...@windriver.com> wrote:

> -if type systemctl >/dev/null 2>/dev/null; then
> +if command -p systemctl >/dev/null 2>/dev/null; then


This doesn't do what you want:

$ type whoami ; echo $?
whoami is /usr/bin/whoami
0
$ type foobar; echo $?
-bash: type: foobar: not found
1

'type' when used with a binary prints the full path (thus the redirect) and
returns success if it was found, error if it wasn't.

$ command -p whoami ; echo $?
ross
0

$ which applyotron
/home/ross/bin/applyotron
$ command -p applyotron
-bash: applyotron: command not found

'command -p' searches for a binary (ignoring any aliases or builtins) in a
hardcoded set of paths as you pass -p (not $PATH, so will fail at rootfs
time) for a binary and executes it if found.  We don't want to look in a
hard-coded set of paths, and we don't want to run the binary, so these
changes are bad.

bash, dash and ash all support type, which is why verify-bashisms has them
on the whitelist as the simplest way of saying "does this binary exist".


        # Remove unpackaged files (based on list in rpm.spec)
> -       rm -f ${D}/${libdir}/rpm/{Specfile.pm,cpanflute,cpanflute2,
> rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req,trpm}
> +       rm -f ${D}/${libdir}/rpm/Specfile.pm
> +       rm -f ${D}/${libdir}/rpm/cpanflute
> +       rm -f ${D}/${libdir}/rpm/cpanflute2
> +       rm -f ${D}/${libdir}/rpm/rpmdiff
> +       rm -f ${D}/${libdir}/rpm/rpmdiff.cgi
> +       rm -f ${D}/${libdir}/rpm/sql.prov
> +       rm -f ${D}/${libdir}/rpm/sql.req
> +       rm -f ${D}/${libdir}/rpm/tcl.req
> +       rm -f ${D}/${libdir}/rpm/trpm
>

I deleted these in "rpm: remove redundant removals" when doing a similar
sweep, so please rebase to master.

I think all thats left is the guile cleanup, so can you submit just that
with a rewritten commit message.

Ross
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to