summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2018-12-03 21:42:36 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-07 12:38:58 +0000
commit86cc1a4104d71235cfdc9b5acfa820758191480a (patch)
treef7d5c2ae11872a93070eb2e8bad9948fbc2d8768 /bitbake/bin
parent7509b5ee0555d1cc8729210e62e122da70b9d080 (diff)
downloadpoky-86cc1a4104d71235cfdc9b5acfa820758191480a.tar.gz
bitbake: bitbake-worker: Pass taskhash as runtask parameter
Pass the task hash as a parameter to the 'runtask' message instead of passing the entire dictionary of hashes when the worker is setup. This is possible less efficient, but prevents the worker taskhashes from being out of sync with the runqueue in the event that the taskhashes in the runqueue change. [YOCTO #13030] (Bitbake rev: 1e86d8c1bec7ea5d016a5ad2097f999362e29033) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake-worker8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index e925054b7f..cd687e6e43 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, extraconfigdata, quieterrors=False, dry_run_exec=False): 139def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskhash, appends, taskdepdata, extraconfigdata, quieterrors=False, dry_run_exec=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
@@ -234,7 +234,7 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, append
234 ret = 0 234 ret = 0
235 235
236 the_data = bb_cache.loadDataFull(fn, appends) 236 the_data = bb_cache.loadDataFull(fn, appends)
237 the_data.setVar('BB_TASKHASH', workerdata["runq_hash"][task]) 237 the_data.setVar('BB_TASKHASH', taskhash)
238 238
239 bb.utils.set_process_name("%s:%s" % (the_data.getVar("PN"), taskname.replace("do_", ""))) 239 bb.utils.set_process_name("%s:%s" % (the_data.getVar("PN"), taskname.replace("do_", "")))
240 240
@@ -425,10 +425,10 @@ class BitbakeWorker(object):
425 sys.exit(0) 425 sys.exit(0)
426 426
427 def handle_runtask(self, data): 427 def handle_runtask(self, data):
428 fn, task, taskname, quieterrors, appends, taskdepdata, dry_run_exec = pickle.loads(data) 428 fn, task, taskname, taskhash, quieterrors, appends, taskdepdata, dry_run_exec = pickle.loads(data)
429 workerlog_write("Handling runtask %s %s %s\n" % (task, fn, taskname)) 429 workerlog_write("Handling runtask %s %s %s\n" % (task, fn, taskname))
430 430
431 pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, self.databuilder, self.workerdata, fn, task, taskname, appends, taskdepdata, self.extraconfigdata, quieterrors, dry_run_exec) 431 pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, self.databuilder, self.workerdata, fn, task, taskname, taskhash, appends, taskdepdata, self.extraconfigdata, quieterrors, dry_run_exec)
432 432
433 self.build_pids[pid] = task 433 self.build_pids[pid] = task
434 self.build_pipes[pid] = runQueueWorkerPipe(pipein, pipeout) 434 self.build_pipes[pid] = runQueueWorkerPipe(pipein, pipeout)