summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake-worker12
1 files changed, 10 insertions, 2 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index 97b32c3878..4dbd681172 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -136,7 +136,7 @@ def sigterm_handler(signum, frame):
136 os.killpg(0, signal.SIGTERM) 136 os.killpg(0, signal.SIGTERM)
137 sys.exit() 137 sys.exit()
138 138
139def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, appends, taskdepdata, quieterrors=False): 139def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, appends, taskdepdata, extraconfigdata, quieterrors=False):
140 # We need to setup the environment BEFORE the fork, since 140 # We need to setup the environment BEFORE the fork, since
141 # a fork() or exec*() activates PSEUDO... 141 # a fork() or exec*() activates PSEUDO...
142 142
@@ -223,6 +223,9 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, append
223 the_data.setVar("BUILDNAME", workerdata["buildname"]) 223 the_data.setVar("BUILDNAME", workerdata["buildname"])
224 the_data.setVar("DATE", workerdata["date"]) 224 the_data.setVar("DATE", workerdata["date"])
225 the_data.setVar("TIME", workerdata["time"]) 225 the_data.setVar("TIME", workerdata["time"])
226 for varname, value in extraconfigdata.items():
227 the_data.setVar(varname, value)
228
226 bb.parse.siggen.set_taskdata(workerdata["sigdata"]) 229 bb.parse.siggen.set_taskdata(workerdata["sigdata"])
227 ret = 0 230 ret = 0
228 231
@@ -329,6 +332,7 @@ class BitbakeWorker(object):
329 self.cookercfg = None 332 self.cookercfg = None
330 self.databuilder = None 333 self.databuilder = None
331 self.data = None 334 self.data = None
335 self.extraconfigdata = None
332 self.build_pids = {} 336 self.build_pids = {}
333 self.build_pipes = {} 337 self.build_pipes = {}
334 338
@@ -363,6 +367,7 @@ class BitbakeWorker(object):
363 pass 367 pass
364 if len(self.queue): 368 if len(self.queue):
365 self.handle_item(b"cookerconfig", self.handle_cookercfg) 369 self.handle_item(b"cookerconfig", self.handle_cookercfg)
370 self.handle_item(b"extraconfigdata", self.handle_extraconfigdata)
366 self.handle_item(b"workerdata", self.handle_workerdata) 371 self.handle_item(b"workerdata", self.handle_workerdata)
367 self.handle_item(b"runtask", self.handle_runtask) 372 self.handle_item(b"runtask", self.handle_runtask)
368 self.handle_item(b"finishnow", self.handle_finishnow) 373 self.handle_item(b"finishnow", self.handle_finishnow)
@@ -391,6 +396,9 @@ class BitbakeWorker(object):
391 self.databuilder.parseBaseConfiguration() 396 self.databuilder.parseBaseConfiguration()
392 self.data = self.databuilder.data 397 self.data = self.databuilder.data
393 398
399 def handle_extraconfigdata(self, data):
400 self.extraconfigdata = pickle.loads(data)
401
394 def handle_workerdata(self, data): 402 def handle_workerdata(self, data):
395 self.workerdata = pickle.loads(data) 403 self.workerdata = pickle.loads(data)
396 bb.msg.loggerDefaultDebugLevel = self.workerdata["logdefaultdebug"] 404 bb.msg.loggerDefaultDebugLevel = self.workerdata["logdefaultdebug"]
@@ -416,7 +424,7 @@ class BitbakeWorker(object):
416 fn, task, taskname, quieterrors, appends, taskdepdata = pickle.loads(data) 424 fn, task, taskname, quieterrors, appends, taskdepdata = pickle.loads(data)
417 workerlog_write("Handling runtask %s %s %s\n" % (task, fn, taskname)) 425 workerlog_write("Handling runtask %s %s %s\n" % (task, fn, taskname))
418 426
419 pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, self.databuilder, self.workerdata, fn, task, taskname, appends, taskdepdata, quieterrors) 427 pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, self.databuilder, self.workerdata, fn, task, taskname, appends, taskdepdata, self.extraconfigdata, quieterrors)
420 428
421 self.build_pids[pid] = task 429 self.build_pids[pid] = task
422 self.build_pipes[pid] = runQueueWorkerPipe(pipein, pipeout) 430 self.build_pipes[pid] = runQueueWorkerPipe(pipein, pipeout)