summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2016-04-30 12:52:48 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-17 21:16:41 +0100
commit4506ccf1495c6ed6e8ed678f4baa166bc94d1761 (patch)
tree2522840affcc41de8c0f227e0ff23ac0678e7051 /bin
parent7ff5b9eed82b7f4fd138fc6d746a0b79efbea98a (diff)
downloadbitbake-contrib-4506ccf1495c6ed6e8ed678f4baa166bc94d1761.zip
bitbake-contrib-4506ccf1495c6ed6e8ed678f4baa166bc94d1761.tar.gz
bitbake-contrib-4506ccf1495c6ed6e8ed678f4baa166bc94d1761.tar.bz2
Implement support for per-task exports
Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bitbake-worker10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/bitbake-worker b/bin/bitbake-worker
index 5fcffdd..6a6b26b 100755
--- a/bin/bitbake-worker
+++ b/bin/bitbake-worker
@@ -208,14 +208,24 @@ def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, taskdepdat
# exported_vars() returns a generator which *cannot* be passed to os.environ.update()
# successfully. We also need to unset anything from the environment which shouldn't be there
exports = bb.data.exported_vars(the_data)
+
bb.utils.empty_environment()
for e, v in exports:
os.environ[e] = v
+
for e in fakeenv:
os.environ[e] = fakeenv[e]
the_data.setVar(e, fakeenv[e])
the_data.setVarFlag(e, 'export', "1")
+ task_exports = the_data.getVarFlag(taskname, 'exports', True)
+ if task_exports:
+ for e in task_exports.split():
+ the_data.setVarFlag(e, 'export', '1')
+ v = the_data.getVar(e, True)
+ if v is not None:
+ os.environ[e] = v
+
if quieterrors:
the_data.setVarFlag(taskname, "quieterrors", "1")