summaryrefslogtreecommitdiffstats
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)
downloadpoky-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
208 # exported_vars() returns a generator which *cannot* be passed to os.environ.update() 208 # exported_vars() returns a generator which *cannot* be passed to os.environ.update()
209 # successfully. We also need to unset anything from the environment which shouldn't be there 209 # successfully. We also need to unset anything from the environment which shouldn't be there
210 exports = bb.data.exported_vars(the_data) 210 exports = bb.data.exported_vars(the_data)
211
211 bb.utils.empty_environment() 212 bb.utils.empty_environment()
212 for e, v in exports: 213 for e, v in exports:
213 os.environ[e] = v 214 os.environ[e] = v
215
214 for e in fakeenv: 216 for e in fakeenv:
215 os.environ[e] = fakeenv[e] 217 os.environ[e] = fakeenv[e]
216 the_data.setVar(e, fakeenv[e]) 218 the_data.setVar(e, fakeenv[e])
217 the_data.setVarFlag(e, 'export', "1") 219 the_data.setVarFlag(e, 'export', "1")
218 220
221 task_exports = the_data.getVarFlag(taskname, 'exports', True)
222 if task_exports:
223 for e in task_exports.split():
224 the_data.setVarFlag(e, 'export', '1')
225 v = the_data.getVar(e, True)
226 if v is not None:
227 os.environ[e] = v
228
219 if quieterrors: 229 if quieterrors:
220 the_data.setVarFlag(taskname, "quieterrors", "1") 230 the_data.setVarFlag(taskname, "quieterrors", "1")
221 231