diff options
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 0bb3bc20ab..241a746ebb 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -1991,11 +1991,19 @@ class RunQueueExecute: | |||
1991 | self.setbuildable(revdep) | 1991 | self.setbuildable(revdep) |
1992 | logger.debug("Marking task %s as buildable", revdep) | 1992 | logger.debug("Marking task %s as buildable", revdep) |
1993 | 1993 | ||
1994 | for t in self.sq_deferred.copy(): | 1994 | found = None |
1995 | for t in sorted(self.sq_deferred.copy()): | ||
1995 | if self.sq_deferred[t] == task: | 1996 | if self.sq_deferred[t] == task: |
1996 | logger.debug2("Deferred task %s now buildable" % t) | 1997 | # Allow the next deferred task to run. Any other deferred tasks should be deferred after that task. |
1997 | del self.sq_deferred[t] | 1998 | # We shouldn't allow all to run at once as it is prone to races. |
1998 | update_scenequeue_data([t], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False) | 1999 | if not found: |
2000 | bb.note("Deferred task %s now buildable" % t) | ||
2001 | del self.sq_deferred[t] | ||
2002 | update_scenequeue_data([t], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False) | ||
2003 | found = t | ||
2004 | else: | ||
2005 | bb.note("Deferring %s after %s" % (t, found)) | ||
2006 | self.sq_deferred[t] = found | ||
1999 | 2007 | ||
2000 | def task_complete(self, task): | 2008 | def task_complete(self, task): |
2001 | self.stats.taskCompleted() | 2009 | self.stats.taskCompleted() |