aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-25 23:18:22 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-26 23:01:33 +0000
commitd0616923724c5d021a816ec778e836283a2ccfe2 (patch)
tree1461f9fed7433f94c5c7ddc6b68121522f3b8391 /bitbake/bin
parent4c69970bd379f441279fe46edd92613e80ea3dc5 (diff)
downloadopenembedded-core-contrib-d0616923724c5d021a816ec778e836283a2ccfe2.tar.gz
bitbake: bitbake: Share BB_TASKDEPDATA with tasks
Currently tasks have no knowledge of which other tasks they depend upon. This makes it impossible to do at least two things which would be desirable/interesting: a) Have the ability to create per recipe sysroots b) Allow the aclocal files to be present only for the entries in DEPENDS (directly and indirectly) By exporting task data through this new variable, tasks can inspect their dependencies and then take actions based upon this. (Bitbake rev: 84f1dde717dac22435005b79d03ee0b80a3e8e62) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake-worker7
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index ff20c1ca98..bc13b4f314 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -81,7 +81,7 @@ def workerlog_write(msg):
lf.write(msg)
lf.flush()
-def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, quieterrors=False):
+def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, taskdepdata, quieterrors=False):
# We need to setup the environment BEFORE the fork, since
# a fork() or exec*() activates PSEUDO...
@@ -148,6 +148,7 @@ def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, quieterror
os.umask(umask)
data.setVar("BB_WORKERCONTEXT", "1")
+ data.setVar("BB_TASKDEPDATA", taskdepdata)
data.setVar("BUILDNAME", workerdata["buildname"])
data.setVar("DATE", workerdata["date"])
data.setVar("TIME", workerdata["time"])
@@ -300,10 +301,10 @@ class BitbakeWorker(object):
sys.exit(0)
def handle_runtask(self, data):
- fn, task, taskname, quieterrors, appends = pickle.loads(data)
+ fn, task, taskname, quieterrors, appends, taskdepdata = pickle.loads(data)
workerlog_write("Handling runtask %s %s %s\n" % (task, fn, taskname))
- pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, self.workerdata, fn, task, taskname, appends, quieterrors)
+ pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, self.workerdata, fn, task, taskname, appends, taskdepdata, quieterrors)
self.build_pids[pid] = task
self.build_pipes[pid] = runQueueWorkerPipe(pipein, pipeout)