From 84f1dde717dac22435005b79d03ee0b80a3e8e62 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 25 Nov 2013 23:18:22 +0000 Subject: 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 --- bin/bitbake-worker | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bin') 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) -- cgit 1.2.3-korg