]> code.ossystems Code Review - openembedded-core.git/commit
utils.bbclass: ensure $0 is correct in wrapper scripts
authorRoss Burton <ross.burton@intel.com>
Thu, 30 May 2013 16:55:10 +0000 (17:55 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 May 2013 20:05:57 +0000 (21:05 +0100)
commite8d2a2a3646f964ec61ece62e14788cd7184dd01
tree449edc367570714d40c5542c5a133dcbd6377679
parent72c6fb8ac57b1f4a5c6dd3a65c3150f1e2f0ffd1
utils.bbclass: ensure $0 is correct in wrapper scripts

Some packages (eg mesa) will invoke a tool with --version and do string matches
on the output (i.e. mesa does $LEX --version |grep "^flex ").  This doesn't work
with the combination of wrapper scripts and binaries that use $0 as they output
"flex.real".

Luckily bash's exec lets you set $0.  As we want to use this we can't use env,
but using export appears to work just as well.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/utils.bbclass