summaryrefslogtreecommitdiffstats
path: root/bitbake/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 23:01:33 +0000
commitd0616923724c5d021a816ec778e836283a2ccfe2 (patch)
tree1461f9fed7433f94c5c7ddc6b68121522f3b8391 /bitbake/bin/bitbake-worker
parent4c69970bd379f441279fe46edd92613e80ea3dc5 (diff)
downloadpoky-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/bitbake-worker')
-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):
81 lf.write(msg) 81 lf.write(msg)
82 lf.flush() 82 lf.flush()
83 83
84def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, quieterrors=False): 84def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, taskdepdata, quieterrors=False):
85 # We need to setup the environment BEFORE the fork, since 85 # We need to setup the environment BEFORE the fork, since
86 # a fork() or exec*() activates PSEUDO... 86 # a fork() or exec*() activates PSEUDO...
87 87
@@ -148,6 +148,7 @@ def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, quieterror
148 os.umask(umask) 148 os.umask(umask)
149 149
150 data.setVar("BB_WORKERCONTEXT", "1") 150 data.setVar("BB_WORKERCONTEXT", "1")
151 data.setVar("BB_TASKDEPDATA", taskdepdata)
151 data.setVar("BUILDNAME", workerdata["buildname"]) 152 data.setVar("BUILDNAME", workerdata["buildname"])
152 data.setVar("DATE", workerdata["date"]) 153 data.setVar("DATE", workerdata["date"])
153 data.setVar("TIME", workerdata["time"]) 154 data.setVar("TIME", workerdata["time"])
@@ -300,10 +301,10 @@ class BitbakeWorker(object):
300 sys.exit(0) 301 sys.exit(0)
301 302
302 def handle_runtask(self, data): 303 def handle_runtask(self, data):
303 fn, task, taskname, quieterrors, appends = pickle.loads(data) 304 fn, task, taskname, quieterrors, appends, taskdepdata = pickle.loads(data)
304 workerlog_write("Handling runtask %s %s %s\n" % (task, fn, taskname)) 305 workerlog_write("Handling runtask %s %s %s\n" % (task, fn, taskname))
305 306
306 pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, self.workerdata, fn, task, taskname, appends, quieterrors) 307 pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, self.workerdata, fn, task, taskname, appends, taskdepdata, quieterrors)
307 308
308 self.build_pids[pid] = task 309 self.build_pids[pid] = task
309 self.build_pipes[pid] = runQueueWorkerPipe(pipein, pipeout) 310 self.build_pipes[pid] = runQueueWorkerPipe(pipein, pipeout)