diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-12-16 07:09:13 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-20 15:22:50 +0000 |
commit | fe7e75075e2d55a45ad2b81c9e493068a156d1dc (patch) | |
tree | d5dddcd32bb50c0cc70fa40120a0acf2f63d859f /bitbake/lib/bb/runqueue.py | |
parent | 764a7801361c6f57ff366be641b1410e7b36f56b (diff) | |
download | poky-fe7e75075e2d55a45ad2b81c9e493068a156d1dc.tar.gz |
bitbake: runqueue: dry-run real tasks when BB_SETSCENE_ENFORCE is set
For the purposes BB_SETSCENE_ENFORCE is designed for (in OE, it is used
by the installation process for the extensible SDK), we don't actually
need the whitelisted real tasks to execute - we just need to have them
in the dependency tree so that we get all of the setscene tasks they
depend on to run. Therefore we can actually dry-run those real tasks
i.e. they won't be run (and thus we won't waste a significant amount of
time doing so) and won't be stamped as having run either. We do already
have a dry-run mode in BitBake (activated by the -n or --dry-run command
line option), but it dry-runs the setscene tasks as well which we don't
want here.
Note that this has no effect on the checking we are doing with
BB_SETSCENE_ENFORCE to ensure that only whitelisted real tasks are
scheduled to run - that's handled separately.
Fixes [YOCTO #10369].
(Bitbake rev: 58f084291beb3a87d8d9fdb36dfe7eff911fa36b)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index da7502118a..1e1bdf4b6e 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -266,6 +266,7 @@ class RunQueueData: | |||
266 | self.multi_provider_whitelist = (cfgData.getVar("MULTI_PROVIDER_WHITELIST") or "").split() | 266 | self.multi_provider_whitelist = (cfgData.getVar("MULTI_PROVIDER_WHITELIST") or "").split() |
267 | self.setscenewhitelist = get_setscene_enforce_whitelist(cfgData) | 267 | self.setscenewhitelist = get_setscene_enforce_whitelist(cfgData) |
268 | self.setscenewhitelist_checked = False | 268 | self.setscenewhitelist_checked = False |
269 | self.setscene_enforce = (cfgData.getVar('BB_SETSCENE_ENFORCE') == "1") | ||
269 | self.init_progress_reporter = bb.progress.DummyMultiStageProcessProgressReporter() | 270 | self.init_progress_reporter = bb.progress.DummyMultiStageProcessProgressReporter() |
270 | 271 | ||
271 | self.reset() | 272 | self.reset() |
@@ -1790,7 +1791,7 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
1790 | bb.event.fire(startevent, self.cfgData) | 1791 | bb.event.fire(startevent, self.cfgData) |
1791 | self.runq_running.add(task) | 1792 | self.runq_running.add(task) |
1792 | self.stats.taskActive() | 1793 | self.stats.taskActive() |
1793 | if not self.cooker.configuration.dry_run: | 1794 | if not (self.cooker.configuration.dry_run or self.rqdata.setscene_enforce): |
1794 | bb.build.make_stamp(taskname, self.rqdata.dataCaches[mc], taskfn) | 1795 | bb.build.make_stamp(taskname, self.rqdata.dataCaches[mc], taskfn) |
1795 | self.task_complete(task) | 1796 | self.task_complete(task) |
1796 | return True | 1797 | return True |
@@ -1801,7 +1802,7 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
1801 | taskdepdata = self.build_taskdepdata(task) | 1802 | taskdepdata = self.build_taskdepdata(task) |
1802 | 1803 | ||
1803 | taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn] | 1804 | taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn] |
1804 | if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run: | 1805 | if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not (self.cooker.configuration.dry_run or self.rqdata.setscene_enforce): |
1805 | if not self.rq.fakeworker: | 1806 | if not self.rq.fakeworker: |
1806 | try: | 1807 | try: |
1807 | self.rq.start_fakeworker(self) | 1808 | self.rq.start_fakeworker(self) |
@@ -1810,10 +1811,10 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
1810 | self.rq.state = runQueueFailed | 1811 | self.rq.state = runQueueFailed |
1811 | self.stats.taskFailed() | 1812 | self.stats.taskFailed() |
1812 | return True | 1813 | return True |
1813 | self.rq.fakeworker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, False, self.cooker.collection.get_file_appends(fn), taskdepdata)) + b"</runtask>") | 1814 | self.rq.fakeworker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, False, self.cooker.collection.get_file_appends(fn), taskdepdata, self.rqdata.setscene_enforce)) + b"</runtask>") |
1814 | self.rq.fakeworker[mc].process.stdin.flush() | 1815 | self.rq.fakeworker[mc].process.stdin.flush() |
1815 | else: | 1816 | else: |
1816 | self.rq.worker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, False, self.cooker.collection.get_file_appends(taskfn), taskdepdata)) + b"</runtask>") | 1817 | self.rq.worker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, False, self.cooker.collection.get_file_appends(taskfn), taskdepdata, self.rqdata.setscene_enforce)) + b"</runtask>") |
1817 | self.rq.worker[mc].process.stdin.flush() | 1818 | self.rq.worker[mc].process.stdin.flush() |
1818 | 1819 | ||
1819 | self.build_stamps[task] = bb.build.stampfile(taskname, self.rqdata.dataCaches[mc], taskfn, noextra=True) | 1820 | self.build_stamps[task] = bb.build.stampfile(taskname, self.rqdata.dataCaches[mc], taskfn, noextra=True) |
@@ -2219,10 +2220,10 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
2219 | if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run: | 2220 | if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run: |
2220 | if not self.rq.fakeworker: | 2221 | if not self.rq.fakeworker: |
2221 | self.rq.start_fakeworker(self) | 2222 | self.rq.start_fakeworker(self) |
2222 | self.rq.fakeworker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, True, self.cooker.collection.get_file_appends(taskfn), taskdepdata)) + b"</runtask>") | 2223 | self.rq.fakeworker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, True, self.cooker.collection.get_file_appends(taskfn), taskdepdata, False)) + b"</runtask>") |
2223 | self.rq.fakeworker[mc].process.stdin.flush() | 2224 | self.rq.fakeworker[mc].process.stdin.flush() |
2224 | else: | 2225 | else: |
2225 | self.rq.worker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, True, self.cooker.collection.get_file_appends(taskfn), taskdepdata)) + b"</runtask>") | 2226 | self.rq.worker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, True, self.cooker.collection.get_file_appends(taskfn), taskdepdata, False)) + b"</runtask>") |
2226 | self.rq.worker[mc].process.stdin.flush() | 2227 | self.rq.worker[mc].process.stdin.flush() |
2227 | 2228 | ||
2228 | self.runq_running.add(task) | 2229 | self.runq_running.add(task) |