summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/runqueue.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-19 12:27:46 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-23 11:57:58 +0100
commit6f4304e36df7e416643dd4a7ee3de096f21f1020 (patch)
treec91f9366df3bb3dd8cb782680cebc21f479a16ce /bitbake/lib/bb/runqueue.py
parent810bf0093a2488e861b361ac03a13b147964171a (diff)
downloadpoky-6f4304e36df7e416643dd4a7ee3de096f21f1020.tar.gz
bitbake: runqueue: Sanity check BB_NUMBER_THREADS
Bitbake does really weird things with negative or zero numbers of threads which is confusing to the user. Add a sanity check for this. When you have code doing arithmetic on the values and a VM reconfigures to only a single thread, negative numbers are easier than you'd think. (Bitbake rev: 32166ac3c85ff3c04081580ae76bd63590d6ff3e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r--bitbake/lib/bb/runqueue.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index cc1aedfce7..17a55d3d6e 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1280,6 +1280,9 @@ class RunQueueExecute:
1280 if rq.fakeworkerpipe: 1280 if rq.fakeworkerpipe:
1281 rq.fakeworkerpipe.setrunqueueexec(self) 1281 rq.fakeworkerpipe.setrunqueueexec(self)
1282 1282
1283 if self.number_tasks <= 0:
1284 bb.fatal("Invalid BB_NUMBER_THREADS %s" % self.number_tasks)
1285
1283 def runqueue_process_waitpid(self, task, status): 1286 def runqueue_process_waitpid(self, task, status):
1284 1287
1285 # self.build_stamps[pid] may not exist when use shared work directory. 1288 # self.build_stamps[pid] may not exist when use shared work directory.