summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/build.py2
-rw-r--r--bitbake/lib/bb/cooker.py2
-rw-r--r--bitbake/lib/bb/data.py6
3 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index f16675bded..1cd546a712 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -239,7 +239,7 @@ def exec_func_python(func, d, runfile, cwd=None):
239 """Execute a python BB 'function'""" 239 """Execute a python BB 'function'"""
240 240
241 bbfile = d.getVar('FILE', True) 241 bbfile = d.getVar('FILE', True)
242 code = _functionfmt.format(function=func, body=d.getVar(func, True)) 242 code = _functionfmt.format(function=func, body=d.getVar(func, False))
243 bb.utils.mkdirhier(os.path.dirname(runfile)) 243 bb.utils.mkdirhier(os.path.dirname(runfile))
244 with open(runfile, 'w') as script: 244 with open(runfile, 'w') as script:
245 bb.data.emit_func_python(func, script, d) 245 bb.data.emit_func_python(func, script, d)
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index d990b05874..af3d77b3a8 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -653,7 +653,7 @@ class BBCooker:
653 data.expandKeys(envdata) 653 data.expandKeys(envdata)
654 for e in envdata.keys(): 654 for e in envdata.keys():
655 if data.getVarFlag( e, 'python', envdata ): 655 if data.getVarFlag( e, 'python', envdata ):
656 logger.plain("\npython %s () {\n%s}\n", e, envdata.getVar(e, True)) 656 logger.plain("\npython %s () {\n%s}\n", e, envdata.getVar(e, False))
657 657
658 658
659 def buildTaskData(self, pkgs_to_build, task, abort, allowincomplete=False): 659 def buildTaskData(self, pkgs_to_build, task, abort, allowincomplete=False):
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 137ed4e3ee..dbc6dea68d 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -298,7 +298,7 @@ def emit_func_python(func, o=sys.__stdout__, d = init()):
298 """Emits all items in the data store in a format such that it can be sourced by a shell.""" 298 """Emits all items in the data store in a format such that it can be sourced by a shell."""
299 299
300 def write_func(func, o, call = False): 300 def write_func(func, o, call = False):
301 body = d.getVar(func, True) 301 body = d.getVar(func, False)
302 if not body.startswith("def"): 302 if not body.startswith("def"):
303 body = _functionfmt.format(function=func, body=body) 303 body = _functionfmt.format(function=func, body=body)
304 304
@@ -308,7 +308,7 @@ def emit_func_python(func, o=sys.__stdout__, d = init()):
308 308
309 write_func(func, o, True) 309 write_func(func, o, True)
310 pp = bb.codeparser.PythonParser(func, logger) 310 pp = bb.codeparser.PythonParser(func, logger)
311 pp.parse_python(d.getVar(func, True)) 311 pp.parse_python(d.getVar(func, False))
312 newdeps = pp.execs 312 newdeps = pp.execs
313 newdeps |= set((d.getVarFlag(func, "vardeps", True) or "").split()) 313 newdeps |= set((d.getVarFlag(func, "vardeps", True) or "").split())
314 seen = set() 314 seen = set()
@@ -320,7 +320,7 @@ def emit_func_python(func, o=sys.__stdout__, d = init()):
320 if d.getVarFlag(dep, "func", False) and d.getVarFlag(dep, "python", False): 320 if d.getVarFlag(dep, "func", False) and d.getVarFlag(dep, "python", False):
321 write_func(dep, o) 321 write_func(dep, o)
322 pp = bb.codeparser.PythonParser(dep, logger) 322 pp = bb.codeparser.PythonParser(dep, logger)
323 pp.parse_python(d.getVar(dep, True)) 323 pp.parse_python(d.getVar(dep, False))
324 newdeps |= pp.execs 324 newdeps |= pp.execs
325 newdeps |= set((d.getVarFlag(dep, "vardeps", True) or "").split()) 325 newdeps |= set((d.getVarFlag(dep, "vardeps", True) or "").split())
326 newdeps -= seen 326 newdeps -= seen