[OE-core] [PATCH 1/1] oe-init-build-env, scripts/oe-buildenv-internal: add error detecting for $BDIR

Phil Blundell philb at gnu.org
Wed Aug 3 14:25:16 UTC 2011


On Wed, 2011-08-03 at 15:21 +0100, Paul Eggleton wrote:
> On Wednesday 03 August 2011 15:11:07 Phil Blundell wrote:
> > Has anybody ever tried to quantify how much work would be involved in
> > making OE work within the constraints of POSIX sh (i.e. work with dash)?
> > It does seem fairly obnoxious/embarrassing that you're obliged to
> > make /bin/sh be bash on a systemwide basis; I can't think offhand of any
> > other piece of software I use that has this kind of requirement.
> 
> Would that not entail fixing everything we build that contains shell scripts 
> with bashisms that claim "#!/bin/sh"?

Yes, but anything that builds on current Ubuntu (etc) will presumably be
OK in that respect, and any shell scripts which are installed on the
target ought to be getting fixed anyway since bash is unlikely to be
available there.  If you assume that those two groups of things are
going to have to be solved anyway (by someone) then it isn't obvious to
me that the remaining problem set will be all that large.

If it were to become a real issue then one could write a class which
searched for shell scripts inside ${S} and reprocessed them to use
#!/bin/bash, or alternatively write an LD_PRELOAD sort of shim to detect
such scripts at exec() time and redirect them to bash rather than sh.

p.






More information about the Openembedded-core mailing list