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:10:23 +0000 (21:10 +0100)
commitf186a3f4c0bb580a4a6d1ebb41f13006d010b76a
tree8672ea6f2b0af50a1f0ff1d318e34ea4a8713356
parentbcdd1053fb7149556603aea7939e042b8d9b7fa3
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.

(From OE-Core rev: e8d2a2a3646f964ec61ece62e14788cd7184dd01)

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