summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-28 09:34:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-11 11:06:23 +0000
commit9f02b50c8c806fc344f5b62c77103db7e96c63ca (patch)
tree42fa3d77179aaa78c72f1a518ecf48331c7febd9 /bitbake
parentd0f86a99f782f371dc2cb94568619c53df07ca3c (diff)
downloadpoky-9f02b50c8c806fc344f5b62c77103db7e96c63ca.tar.gz
bitbake: runqueue: Fix task dependency corner case in sanity test
A corner case was identified where tasks with valid stamps from previous builds need to be accounted for in the new sanity test in the migration code. Add a variable to track such completed tasks to ensure the sanity test works correctly. (Bitbake rev: 39cc4930676970b2e51b99a778f5d5d9b5259991) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d517b1ef13ca7ab2fb4d761d3bd3b9fb7c591514) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-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 56ca2529ca..6e3a91b850 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1708,6 +1708,7 @@ class RunQueueExecute:
1708 self.runq_buildable = set() 1708 self.runq_buildable = set()
1709 self.runq_running = set() 1709 self.runq_running = set()
1710 self.runq_complete = set() 1710 self.runq_complete = set()
1711 self.runq_tasksrun = set()
1711 1712
1712 self.build_stamps = {} 1713 self.build_stamps = {}
1713 self.build_stamps2 = [] 1714 self.build_stamps2 = []
@@ -1893,6 +1894,7 @@ class RunQueueExecute:
1893 self.stats.taskCompleted() 1894 self.stats.taskCompleted()
1894 bb.event.fire(runQueueTaskCompleted(task, self.stats, self.rq), self.cfgData) 1895 bb.event.fire(runQueueTaskCompleted(task, self.stats, self.rq), self.cfgData)
1895 self.task_completeoutright(task) 1896 self.task_completeoutright(task)
1897 self.runq_tasksrun.add(task)
1896 1898
1897 def task_fail(self, task, exitcode): 1899 def task_fail(self, task, exitcode):
1898 """ 1900 """
@@ -2092,6 +2094,7 @@ class RunQueueExecute:
2092 logger.debug(2, "Stamp current task %s", task) 2094 logger.debug(2, "Stamp current task %s", task)
2093 2095
2094 self.task_skip(task, "existing") 2096 self.task_skip(task, "existing")
2097 self.runq_tasksrun.add(task)
2095 return True 2098 return True
2096 2099
2097 taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn] 2100 taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
@@ -2353,7 +2356,7 @@ class RunQueueExecute:
2353 if tid in self.tasks_scenequeue_done: 2356 if tid in self.tasks_scenequeue_done:
2354 self.tasks_scenequeue_done.remove(tid) 2357 self.tasks_scenequeue_done.remove(tid)
2355 for dep in self.sqdata.sq_covered_tasks[tid]: 2358 for dep in self.sqdata.sq_covered_tasks[tid]:
2356 if dep in self.runq_complete: 2359 if dep in self.runq_complete and dep not in self.runq_tasksrun:
2357 bb.error("Task %s marked as completed but now needing to rerun? Aborting build." % dep) 2360 bb.error("Task %s marked as completed but now needing to rerun? Aborting build." % dep)
2358 self.failed_tids.append(tid) 2361 self.failed_tids.append(tid)
2359 self.rq.state = runQueueCleanUp 2362 self.rq.state = runQueueCleanUp