diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-19 12:27:46 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-19 22:43:48 +0100 |
commit | 32166ac3c85ff3c04081580ae76bd63590d6ff3e (patch) | |
tree | 38becb485fdd5dc747b6fdfd6c8b1879293aeffa /lib/bb/runqueue.py | |
parent | 29d28e22ce431c3d3aabdb88ff4d8cca67a1cfad (diff) | |
download | bitbake-contrib-32166ac3c85ff3c04081580ae76bd63590d6ff3e.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/runqueue.py')
-rw-r--r-- | lib/bb/runqueue.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index cc1aedfce..17a55d3d6 100644 --- a/lib/bb/runqueue.py +++ b/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. |