summaryrefslogtreecommitdiffstats
path: root/bin/bitbake-worker
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 15:32:09 +0000
commit84f1dde717dac22435005b79d03ee0b80a3e8e62 (patch)
treeb091d1f4f0b80107318bd4de5ebe27f795af9682 /bin/bitbake-worker
parent4841c1d37c503a366f99e3a134dca7440e3a08ea (diff)
downloadbitbake-contrib-84f1dde717dac22435005b79d03ee0b80a3e8e62.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin/bitbake-worker')
-rwxr-xr-xbin/bitbake-worker7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/bitbake-worker b/bin/bitbake-worker
index ff20c1ca9..bc13b4f31 100755
--- a/bin/bitbake-worker
+++ b/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)