From 6f4304e36df7e416643dd4a7ee3de096f21f1020 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 19 Jun 2015 12:27:46 +0100 Subject: 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 --- bitbake/lib/bb/runqueue.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bitbake/lib/bb/runqueue.py') 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: if rq.fakeworkerpipe: rq.fakeworkerpipe.setrunqueueexec(self) + if self.number_tasks <= 0: + bb.fatal("Invalid BB_NUMBER_THREADS %s" % self.number_tasks) + def runqueue_process_waitpid(self, task, status): # self.build_stamps[pid] may not exist when use shared work directory. -- cgit v1.2.3-54-g00ecf