summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-31 11:17:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-31 15:52:17 +0000
commitd93620baea489c9b20f740c0d06dcb39cf364ecb (patch)
tree687e2c2eb9dd1b4b12dd870ddee4483d9727a8fd /bitbake/lib
parent5e6db9dc4ddbd055c72b02437bfeae942259ef9a (diff)
downloadpoky-d93620baea489c9b20f740c0d06dcb39cf364ecb.tar.gz
bitbake: runqueue: Fix race against tasks sharing stamp files
Shared work directories work by assuming bitbake will not run more than one task with a specific stamp name. Recent runqueue optimisations accidentally broke this meaning there could be races. This fixes the code. (Bitbake rev: b1628b1a260ddf43fc9985535b1ddcfcebbb1e5b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/runqueue.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 0475ee2177..91b1f07351 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -125,7 +125,10 @@ class RunQueueScheduler(object):
125 if not self.buildable: 125 if not self.buildable:
126 return None 126 return None
127 if len(self.buildable) == 1: 127 if len(self.buildable) == 1:
128 return self.buildable[0] 128 taskid = self.buildable[0]
129 stamp = self.stamps[taskid]
130 if stamp not in self.rq.build_stamps.itervalues():
131 return taskid
129 132
130 if not self.rev_prio_map: 133 if not self.rev_prio_map:
131 self.rev_prio_map = range(self.numTasks) 134 self.rev_prio_map = range(self.numTasks)