diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-28 09:34:56 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-02 16:43:01 +0000 |
commit | c9692bdff049970df87bc9eb97beb5322ecf6880 (patch) | |
tree | d4f964b1bff1fe2dce0cc66a3ab676a4c58b7a4d /bitbake/lib | |
parent | 7ab33df995f370a2597720245d28616cad203198 (diff) | |
download | poky-c9692bdff049970df87bc9eb97beb5322ecf6880.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: d517b1ef13ca7ab2fb4d761d3bd3b9fb7c591514)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 5 |
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 |