diff options
author | Richard Tollerton <rich.tollerton@ni.com> | 2014-12-17 19:11:18 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-18 10:28:44 +0000 |
commit | 0a791e91e55d30b328ddbd90fdb0d5911c388b96 (patch) | |
tree | 18d01b5f88be35b4e402bf66b51fca52e6e59183 /bitbake/lib | |
parent | bb83fccb4b4dbb1fbadc7c1cb1f51a39840c9f95 (diff) | |
download | poky-0a791e91e55d30b328ddbd90fdb0d5911c388b96.tar.gz |
bitbake: data: escape '$' in shell variable assignment
Running bitbake inside make results in the exported environment variable
MAKEOVERRIDES="${-*-command-variables-*-}", which the shell chokes on
when trying to expand it. But of course, it probably shouldn't have been
trying to expand it in the first place -- so just escape the dollar
sign.
(Bitbake rev: 18cd0ce6a55c9065c3f1bf223b47d817b5efcd8f)
Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/data.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py index eb628c7df3..82eefef1a6 100644 --- a/bitbake/lib/bb/data.py +++ b/bitbake/lib/bb/data.py | |||
@@ -238,6 +238,7 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False): | |||
238 | # to a shell, we need to escape the quotes in the var | 238 | # to a shell, we need to escape the quotes in the var |
239 | alter = re.sub('"', '\\"', val) | 239 | alter = re.sub('"', '\\"', val) |
240 | alter = re.sub('\n', ' \\\n', alter) | 240 | alter = re.sub('\n', ' \\\n', alter) |
241 | alter = re.sub('\\$', '\\\\$', alter) | ||
241 | o.write('%s="%s"\n' % (varExpanded, alter)) | 242 | o.write('%s="%s"\n' % (varExpanded, alter)) |
242 | return 0 | 243 | return 0 |
243 | 244 | ||