]> code.ossystems Code Review - openembedded-core.git/commitdiff
data: fewer newlines for (un)export
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mon, 3 Jan 2011 19:57:20 +0000 (20:57 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 4 Jan 2011 15:00:11 +0000 (15:00 +0000)
Previously we emitted two newlines for export and unexport.
One newline for export and unexport is enough (and makes the scripts
look better and a tad smaller).

(Bitbake rev: ba060160fdf1278a273fb2b77d36b8c681807ecf)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/data.py

index b3abf318af7a527fb0756b037b9d390530e07d9f..6ec522aa4836dc049e6e6f0017b5f9bce6cfcaca 100644 (file)
@@ -201,7 +201,7 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
 
     if unexport:
         o.write('unset %s\n' % varExpanded)
-        return 1
+        return 0
 
     if not val:
         return 0
@@ -220,7 +220,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.strip())
     o.write('%s="%s"\n' % (varExpanded, alter))
-    return 1
+    return 0
 
 def emit_env(o=sys.__stdout__, d = init(), all=False):
     """Emits all items in the data store in a format such that it can be sourced by a shell."""