[bitbake-devel] [PATCH] data: Avoid attempting to assign readonly shell vars
richard.purdie at linuxfoundation.org
Thu Dec 18 10:29:25 UTC 2014
On Wed, 2014-12-17 at 19:11 -0600, Richard Tollerton wrote:
> Attempting to set a read-only shell variable kills the shell. This is
> required POSIX behavior, it can't be disabled, and it's implemented by
> both dash and bash (although it seems to have only started happening in
> bash 4.3 and later, and only when run as /bin/sh).
> This breaks `bitbake -c devshell` if bash 4.3 is installed, because
> BASHOPTS (and a boatload of other shell variables) are readonly.
> The fix is to attempt to modify the variable in a subshell before doing
> the assignment.
Isn't this going to involve fork() calls for every single shell
variable? There must be a better way to do this?
More information about the bitbake-devel