diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-21 14:11:24 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-11 17:21:47 +0000 |
commit | 7bab6ffc45494aea9b5c6264a153b3f9b6290301 (patch) | |
tree | 4446bd4a22b27ff8152e1d953132b929aa775ad1 /bitbake | |
parent | 6b49da40e7734e98a86aab09559e4dc50af95c25 (diff) | |
download | poky-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>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 15 |
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: | |||
1060 | for mc in self.rqdata.dataCaches: | 1060 | for mc in self.rqdata.dataCaches: |
1061 | self.worker[mc] = self._start_worker(mc) | 1061 | self.worker[mc] = self._start_worker(mc) |
1062 | 1062 | ||
1063 | def start_fakeworker(self, rqexec): | 1063 | def start_fakeworker(self, rqexec, mc): |
1064 | if not self.fakeworker: | 1064 | if not mc in self.fakeworker: |
1065 | for mc in self.rqdata.dataCaches: | 1065 | self.fakeworker[mc] = self._start_worker(mc, True, rqexec) |
1066 | self.fakeworker[mc] = self._start_worker(mc, True, rqexec) | ||
1067 | 1066 | ||
1068 | def teardown_workers(self): | 1067 | def teardown_workers(self): |
1069 | self.teardown = True | 1068 | self.teardown = True |
@@ -1788,9 +1787,9 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
1788 | 1787 | ||
1789 | taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn] | 1788 | taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn] |
1790 | if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run: | 1789 | if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run: |
1791 | if not self.rq.fakeworker: | 1790 | if not mc in self.rq.fakeworker: |
1792 | try: | 1791 | try: |
1793 | self.rq.start_fakeworker(self) | 1792 | self.rq.start_fakeworker(self, mc) |
1794 | except OSError as exc: | 1793 | except OSError as exc: |
1795 | logger.critical("Failed to spawn fakeroot worker to run %s: %s" % (task, str(exc))) | 1794 | logger.critical("Failed to spawn fakeroot worker to run %s: %s" % (task, str(exc))) |
1796 | self.rq.state = runQueueFailed | 1795 | self.rq.state = runQueueFailed |
@@ -2202,8 +2201,8 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
2202 | 2201 | ||
2203 | taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn] | 2202 | taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn] |
2204 | if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run: | 2203 | if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run: |
2205 | if not self.rq.fakeworker: | 2204 | if not mc in self.rq.fakeworker: |
2206 | self.rq.start_fakeworker(self) | 2205 | self.rq.start_fakeworker(self, mc) |
2207 | 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>") | 2206 | 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>") |
2208 | self.rq.fakeworker[mc].process.stdin.flush() | 2207 | self.rq.fakeworker[mc].process.stdin.flush() |
2209 | else: | 2208 | else: |