aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-21 14:11:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-11 17:21:47 +0000
commit7bab6ffc45494aea9b5c6264a153b3f9b6290301 (patch)
tree4446bd4a22b27ff8152e1d953132b929aa775ad1
parent6b49da40e7734e98a86aab09559e4dc50af95c25 (diff)
downloadopenembedded-core-contrib-7bab6ffc45494aea9b5c6264a153b3f9b6290301.tar.gz
bitbake: runqueue: Only start fakeroot workers when needed
Fakeroot workers usually have dependencies that need to be ready before they can be started. Starting them as a block therefore doesn't work as the dependencies may or may not have been built. Therefore start the multiconfig fakeworkers individually upon demand. [YOCTO #10344] (Bitbake rev: ac5ea74152b011256209c8b5664216f290b123e8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/runqueue.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 61036b3eb6..9384c72baf 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1060,10 +1060,9 @@ class RunQueue:
for mc in self.rqdata.dataCaches:
self.worker[mc] = self._start_worker(mc)
- def start_fakeworker(self, rqexec):
- if not self.fakeworker:
- for mc in self.rqdata.dataCaches:
- self.fakeworker[mc] = self._start_worker(mc, True, rqexec)
+ def start_fakeworker(self, rqexec, mc):
+ if not mc in self.fakeworker:
+ self.fakeworker[mc] = self._start_worker(mc, True, rqexec)
def teardown_workers(self):
self.teardown = True
@@ -1788,9 +1787,9 @@ class RunQueueExecuteTasks(RunQueueExecute):
taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run:
- if not self.rq.fakeworker:
+ if not mc in self.rq.fakeworker:
try:
- self.rq.start_fakeworker(self)
+ self.rq.start_fakeworker(self, mc)
except OSError as exc:
logger.critical("Failed to spawn fakeroot worker to run %s: %s" % (task, str(exc)))
self.rq.state = runQueueFailed
@@ -2202,8 +2201,8 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run:
- if not self.rq.fakeworker:
- self.rq.start_fakeworker(self)
+ if not mc in self.rq.fakeworker:
+ self.rq.start_fakeworker(self, mc)
self.rq.fakeworker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, True, self.cooker.collection.get_file_appends(taskfn), None)) + b"</runtask>")
self.rq.fakeworker[mc].process.stdin.flush()
else: