<div dir="ltr"><div class="gmail_extra">On 22 September 2016 at 10:33, <span dir="ltr"><<a href="mailto:zhe.he@windriver.com" target="_blank">zhe.he@windriver.com</a>></span> wrote:</div><div class="gmail_extra"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:12.800000190734863px">-if type systemctl >/dev/null 2>/dev/null; then<br></span><span style="font-size:12.800000190734863px">+if command -p systemctl >/dev/null 2>/dev/null; then</span></blockquote><div><br></div><div>This doesn't do what you want:</div><div><br></div><div><div>$ type whoami ; echo $?</div><div>whoami is /usr/bin/whoami</div></div><div>0</div><div><div>$ type foobar; echo $?</div><div>-bash: type: foobar: not found</div><div>1</div></div><div><br></div><div>'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.</div><div><br></div><div>$ command -p whoami ; echo $?</div><div>ross</div><div>0</div><div><br></div><div><div><div>$ which applyotron<br></div><div>/home/ross/bin/applyotron</div></div><div>$ command -p applyotron</div><div>-bash: applyotron: command not found</div><div><br></div></div><div>'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.</div><div><br></div><div>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".</div><div><br></div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id="gmail-:3va" class="gmail-a3s gmail-aXjCH gmail-m157513fd5001a357"> # Remove unpackaged files (based on list in rpm.spec)<br>
- rm -f ${D}/${libdir}/rpm/{Specfile.<wbr>pm,cpanflute,cpanflute2,<wbr>rpmdiff,rpmdiff.cgi,sql.prov,<wbr>sql.req,tcl.req,trpm}<br>
+ rm -f ${D}/${libdir}/rpm/Specfile.pm<br>
+ rm -f ${D}/${libdir}/rpm/cpanflute<br>
+ rm -f ${D}/${libdir}/rpm/cpanflute2<br>
+ rm -f ${D}/${libdir}/rpm/rpmdiff<br>
+ rm -f ${D}/${libdir}/rpm/rpmdiff.cgi<br>
+ rm -f ${D}/${libdir}/rpm/sql.prov<br>
+ rm -f ${D}/${libdir}/rpm/sql.req<br>
+ rm -f ${D}/${libdir}/rpm/tcl.req<br>
+ rm -f ${D}/${libdir}/rpm/trpm</div></blockquote></div><br>I deleted these in "rpm: remove redundant removals" when doing a similar sweep, so please rebase to master.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I think all thats left is the guile cleanup, so can you submit just that with a rewritten commit message.</div><div class="gmail_extra"><br></div><div>Ross</div></div>