summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-22 16:17:39 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-25 13:00:18 +0000
commitb1c15cb9077f1d2e19376ff8506359ebbb77d6e3 (patch)
tree7674f0cac5ac9f3a4aea3eee6bfc4461b2ba259d /bitbake/lib/bb/data.py
parent6ddb9bf0976169fde7eee16d70a83210aa354416 (diff)
downloadpoky-b1c15cb9077f1d2e19376ff8506359ebbb77d6e3.tar.gz
poky-b1c15cb9077f1d2e19376ff8506359ebbb77d6e3.tar.bz2
poky-b1c15cb9077f1d2e19376ff8506359ebbb77d6e3.zip
bitbake: data: Fix output inconsistencies for emit_var
VAL = "" (not shown) VAL = " " (shown as "") VAL = " x" (shown as "x") would all show up rather differently to what would be expected in the bitbake -e output. This fixes things so they appear consistently. The output for running some shell functions may also change slightly but shouldn't change in a way that is likely to cause problems. [YOCTO #5507] (Bitbake rev: fcba5ef0053dc0ef5360e4912609e5d52f5046b0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data.py')
-rw-r--r--bitbake/lib/bb/data.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 349fcfe878..bdd1e79e24 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -214,7 +214,7 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
o.write('unset %s\n' % varExpanded)
return 0
- if not val:
+ if val is None:
return 0
val = str(val)
@@ -229,7 +229,7 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
# if we're going to output this within doublequotes,
# to a shell, we need to escape the quotes in the var
- alter = re.sub('"', '\\"', val.strip())
+ alter = re.sub('"', '\\"', val)
alter = re.sub('\n', ' \\\n', alter)
o.write('%s="%s"\n' % (varExpanded, alter))
return 0