aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-23 22:41:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-02 16:19:37 +0100
commitb707d0cbc25fa336a1e95ff588f1ea37eee063eb (patch)
tree57b5edca1bceb62eeec7ae7b6bc25af0e632b911 /lib
parent19a6e35600ae6d2d1bcecca6e68ab8c37674774e (diff)
downloadbitbake-b707d0cbc25fa336a1e95ff588f1ea37eee063eb.tar.gz
runqueue: Improve scenequeue processing logic
Rather than a special copy of the data structure which we change, compute the logic using set operations from other data we have. This means we can add tasks back into the scenequeue without having to worry about reversing operations on this variable with all the potential bugs that might involve. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/runqueue.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 6a2de240c..9883a982c 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -2206,12 +2206,9 @@ class RunQueueExecute:
logger.debug(2, "%s was unavailable and is a hard dependency of %s so skipping" % (task, dep))
self.sq_task_failoutright(dep)
continue
- if task not in self.sqdata.sq_revdeps2[dep]:
- # May already have been removed by the fail case above
- continue
- self.sqdata.sq_revdeps2[dep].remove(task)
- if len(self.sqdata.sq_revdeps2[dep]) == 0:
- self.sq_buildable.add(dep)
+ if self.sqdata.sq_revdeps[dep].issubset(self.scenequeue_covered | self.scenequeue_notcovered):
+ if dep not in self.sq_buildable:
+ self.sq_buildable.add(dep)
next = set([task])
while next:
@@ -2377,8 +2374,6 @@ class SQData(object):
self.sq_deps = {}
# SceneQueue reverse dependencies
self.sq_revdeps = {}
- # Copy of reverse dependencies used by sq processing code
- self.sq_revdeps2 = {}
# Injected inter-setscene task dependencies
self.sq_harddeps = {}
# Cache of stamp files so duplicates can't run in parallel
@@ -2537,7 +2532,6 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq):
# bb.warn("Task %s_setscene: is %s " % (tid, data))
sqdata.sq_revdeps = sq_revdeps_squash
- sqdata.sq_revdeps2 = copy.deepcopy(sqdata.sq_revdeps)
sqdata.sq_covered_tasks = sq_collated_deps
# Build reverse version of revdeps to populate deps structure