]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: runqueue: Further scheduler buildable tasks cleanup
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 3 Jul 2019 21:57:52 +0000 (22:57 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 15 Jul 2019 09:28:12 +0000 (10:28 +0100)
The code for setting up buildable tasks can be simplified.

(Bitbake rev: ce3cd2df5b034f8dbdcf9834e8b9a393b6b01aad)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/runqueue.py

index 78e09945a03e13dce24d5a28a88162cfe0cfd6a8..dac0cd9cb991a0e0f65d67e49d1754060c9bd8ad 100644 (file)
@@ -196,11 +196,6 @@ class RunQueueScheduler(object):
         if self.rq.can_start_task():
             return self.next_buildable_task()
 
-    def initbuildable(self):
-        for tid in self.rqdata.runtaskentries:
-            if tid in self.rq.runq_buildable:
-                self.buildable.append(tid)
-
     def newbuildable(self, task):
         self.buildable.append(task)
 
@@ -2504,7 +2499,7 @@ def start_runqueue_tasks(rqexec):
         # Mark initial buildable tasks
         for tid in rqexec.rqdata.runtaskentries:
             if len(rqexec.rqdata.runtaskentries[tid].depends) == 0:
-                rqexec.runq_buildable.add(tid)
+                rqexec.setbuildable(tid)
             if len(rqexec.rqdata.runtaskentries[tid].revdeps) > 0 and rqexec.rqdata.runtaskentries[tid].revdeps.issubset(rqexec.scenequeue_covered):
                 rqexec.scenequeue_covered.add(tid)
 
@@ -2527,8 +2522,6 @@ def start_runqueue_tasks(rqexec):
         for task in self.rq.scenequeue_notcovered:
             logger.debug(1, 'Not skipping task %s', task)
 
-        rqexec.sched.initbuildable()
-
 class TaskFailure(Exception):
     """
     Exception raised when a task in a runqueue fails