From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Richard Tollerton <rich.tollerton@ni.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH] data: Avoid attempting to assign readonly shell vars
Date: Thu, 18 Dec 2014 10:29:25 +0000 [thread overview]
Message-ID: <1418898565.5106.19.camel@linuxfoundation.org> (raw)
In-Reply-To: <1418865078-10484-1-git-send-email-rich.tollerton@ni.com>
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?
Cheers,
Richard
next prev parent reply other threads:[~2014-12-18 10:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-18 1:11 [PATCH] data: Avoid attempting to assign readonly shell vars Richard Tollerton
2014-12-18 1:11 ` [PATCH] data: escape '$' in shell variable assignment Richard Tollerton
2014-12-18 10:29 ` Richard Purdie [this message]
2014-12-18 20:18 ` [PATCH] data: Avoid attempting to assign readonly shell vars Richard Tollerton
2014-12-18 22:28 ` Richard Purdie
2014-12-18 23:47 ` Richard Tollerton
2014-12-19 0:03 ` Richard Tollerton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1418898565.5106.19.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
--cc=rich.tollerton@ni.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.