aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-worker
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-19 09:05:20 +0100
commit692b87497e99379a6cf6362636aa06093ebd643c (patch)
treeac8526bd64e4d9fb3115371b4bd59b291dcbeab0 /bitbake/bin/bitbake-worker
parenta809f1c6afb8d3cf2309078103f5fbdbf071cf09 (diff)
downloadopenembedded-core-contrib-692b87497e99379a6cf6362636aa06093ebd643c.tar.gz
bitbake: Implement support for per-task exports
(Bitbake rev: 4506ccf1495c6ed6e8ed678f4baa166bc94d1761) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin/bitbake-worker')
-rwxr-xr-xbitbake/bin/bitbake-worker10
1 files changed, 10 insertions, 0 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index 5fcffddd4d..6a6b26b64a 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/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")