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:24:45 +0000 |
commit | 18cd0ce6a55c9065c3f1bf223b47d817b5efcd8f (patch) | |
tree | a879f29f43e693ff2c08e0c62c9e3c4f45a35eb4 /lib/bb/data.py | |
parent | 3a5b78af4f3cab203824d933a73e82a41ab377e3 (diff) | |
download | openembedded-core-contrib-18cd0ce6a55c9065c3f1bf223b47d817b5efcd8f.tar.gz |
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.
Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data.py')
-rw-r--r-- | lib/bb/data.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py index eb628c7df3..82eefef1a6 100644 --- a/lib/bb/data.py +++ b/lib/bb/data.py @@ -238,6 +238,7 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False): # to a shell, we need to escape the quotes in the var alter = re.sub('"', '\\"', val) alter = re.sub('\n', ' \\\n', alter) + alter = re.sub('\\$', '\\\\$', alter) o.write('%s="%s"\n' % (varExpanded, alter)) return 0 |