[bitbake-devel] [PATCH 1/1] [daisy][dizzy] data.py: fixes bad substitution when running devshell

Alejandro Hernandez alejandro.hernandez at linux.intel.com
Thu Apr 9 20:21:49 UTC 2015


From: Richard Tollerton <rich.tollerton at ni.com>

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 at ni.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
Signed-off-by: Alejandro Hernandez <alejandro.hernandez at linux.intel.com>

---
 bitbake/lib/bb/data.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index eb628c7..82eefef 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):
     # 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
 
-- 
1.9.1




More information about the bitbake-devel mailing list