[oe-commits] [bitbake] 02/02: runqueue: Improve determinism

git at git.openembedded.org git at git.openembedded.org
Mon Aug 5 22:37:30 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit c2b44cdca66a0362e8315cffeb6356877731f39d
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Mon Aug 5 23:31:25 2019 +0100

    runqueue: Improve determinism
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/runqueue.py | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index a45ec53..bb61087 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -1908,7 +1908,7 @@ class RunQueueExecute:
         task = None
         if not self.sqdone and self.can_start_task():
             # Find the next setscene to run
-            for nexttask in self.rqdata.runq_setscene_tids:
+            for nexttask in sorted(self.rqdata.runq_setscene_tids):
                 if nexttask in self.sq_buildable and nexttask not in self.sq_running and self.sqdata.stamps[nexttask] not in self.build_stamps.values():
                     if nexttask not in self.sqdata.unskippable and len(self.sqdata.sq_revdeps[nexttask]) > 0 and self.sqdata.sq_revdeps[nexttask].issubset(self.scenequeue_covered) and self.check_dependencies(nexttask, self.sqdata.sq_revdeps[nexttask]):
                         if nexttask not in self.rqdata.target_tids:
@@ -2275,8 +2275,8 @@ class RunQueueExecute:
         notcovered = set([task])
         while notcovered:
             new = set()
-            for t in notcovered:
-                for deptask in self.rqdata.runtaskentries[t].depends:
+            for t in sorted(notcovered):
+                for deptask in sorted(self.rqdata.runtaskentries[t].depends):
                     if deptask in notcovered or deptask in new or deptask in self.rqdata.runq_setscene_tids or deptask in self.tasks_notcovered:
                         continue
                     logger.debug(1, 'Task %s depends on non-setscene task %s so not skipping' % (t, deptask))
@@ -2292,8 +2292,8 @@ class RunQueueExecute:
         ready = set([task])
         while ready:
             new = set()
-            for t in ready:
-                for deptask in self.rqdata.runtaskentries[t].revdeps:
+            for t in sorted(ready):
+                for deptask in sorted(self.rqdata.runtaskentries[t].revdeps):
                     if deptask in ready or deptask in new or deptask in self.tasks_scenequeue_done or deptask in self.rqdata.runq_setscene_tids:
                         continue
                     if deptask in self.sqdata.unskippable:
@@ -2304,7 +2304,7 @@ class RunQueueExecute:
             ready = new
 
     def scenequeue_updatecounters(self, task, fail=False):
-        for dep in self.sqdata.sq_deps[task]:
+        for dep in sorted(self.sqdata.sq_deps[task]):
             if fail and task in self.sqdata.sq_harddeps and dep in self.sqdata.sq_harddeps[task]:
                 logger.debug(2, "%s was unavailable and is a hard dependency of %s so skipping" % (task, dep))
                 self.sq_task_failoutright(dep)
@@ -2316,7 +2316,7 @@ class RunQueueExecute:
         next = set([task])
         while next:
             new = set()
-            for t in next:
+            for t in sorted(next):
                 self.tasks_scenequeue_done.add(t)
                 # Look down the dependency chain for non-setscene things which this task depends on
                 # and mark as 'done'
@@ -2338,7 +2338,7 @@ class RunQueueExecute:
             logger.debug(1, 'Queued setscene task %s', task)
             self.coveredtopocess.add(task)
 
-        for task in self.coveredtopocess.copy():
+        for task in sorted(self.coveredtopocess.copy()):
             if self.sqdata.sq_covered_tasks[task].issubset(self.tasks_scenequeue_done):
                 logger.debug(1, 'Processing setscene task %s', task)
                 covered = self.sqdata.sq_covered_tasks[task]
@@ -2346,7 +2346,7 @@ class RunQueueExecute:
 
                 # If a task is in target_tids and isn't a setscene task, we can't skip it.
                 cantskip = covered.intersection(self.rqdata.target_tids).difference(self.rqdata.runq_setscene_tids)
-                for tid in cantskip:
+                for tid in sorted(cantskip):
                     self.tasks_notcovered.add(tid)
                     self.scenequeue_process_notcovered(tid)
                 covered.difference_update(cantskip)
@@ -2355,7 +2355,7 @@ class RunQueueExecute:
                 covered.difference_update(self.tasks_notcovered)
                 self.tasks_covered.update(covered)
                 self.coveredtopocess.remove(task)
-                for tid in covered:
+                for tid in sorted(covered):
                     if self.rqdata.runtaskentries[tid].depends.issubset(self.runq_complete):
                         self.setbuildable(tid)
         self.update_holdofftasks()
@@ -2567,7 +2567,7 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq):
     while new:
         new = False
         orig = sqdata.unskippable.copy()
-        for tid in orig:
+        for tid in sorted(orig, reverse=True):
             if tid in rqdata.runq_setscene_tids:
                 continue
             if len(rqdata.runtaskentries[tid].depends) == 0:
@@ -2661,7 +2661,7 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq):
         stamppresent = []
         tocheck = set()
 
-        for tid in sqdata.sq_revdeps:
+        for tid in sorted(sqdata.sq_revdeps):
             (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
 
             taskdep = rqdata.dataCaches[mc].task_deps[taskfn]
@@ -2694,7 +2694,7 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq):
 
         hashes = {}
         for mc in sorted(multiconfigs):
-          for tid in sqdata.sq_revdeps:
+          for tid in sorted(sqdata.sq_revdeps):
             if mc_from_tid(tid) != mc:
                 continue
             if tid not in valid_new and tid not in noexec and tid not in sqrq.scenequeue_notcovered:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list