[OE-core] what shell programming constructs can we count on in .bbclass files?
Robert P. J. Day
rpjday at crashcourse.ca
Wed Mar 15 13:34:09 UTC 2017
On Wed, 15 Mar 2017, Patrick Ohly wrote:
> On Wed, 2017-03-15 at 11:05 +0000, Burton, Ross wrote:
> > Our shell parser *should* be POSIX compliant. There are a few
> > places where it isn't, but I believe those should be considered
> > bugs. At the end of the day the shell is actually executed by
> > /bin/sh or /bin/bash anyway, so as long as bitbake can parse it
> > you can use anything.
>
> Unfortunately bitbake has problems parsing useful things like $( ).
> Are there open bugs about that and/or is it worth filing enhancement
> requests?
on a more basic level, there's quite a lot of, i guess, bourne
shell'isms (and other weirdnesses) still lying around. in
meta/classes/, some examples (hoping i didn't screw them up):
"if test" rather then "if ["
all that 'if [ "x${VAR} = "x" ]' i mentioned earlier
if [ "x${ICE_PATH}" = "x" ] rather than if [ -z "${ICE_PATH}" ]
if [ ! -z "${conf_sign_keyname}" ] ... ?????? :-)
none of this is a big deal, but there sure are some historical
holdovers and strangely-chosen constructs.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
More information about the Openembedded-core
mailing list