diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-14 16:03:45 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-14 17:08:40 +0100 |
commit | 6c058341f9b0bee6af2554d897a2623a2ea9a479 (patch) | |
tree | c5dd807b62d878b9ed9f1fc3a991350236ed7416 /bitbake/lib | |
parent | f3e8982dfd587e196b0b2d9559ea25d82160b4ea (diff) | |
download | ast2050-yocto-poky-6c058341f9b0bee6af2554d897a2623a2ea9a479.zip ast2050-yocto-poky-6c058341f9b0bee6af2554d897a2623a2ea9a479.tar.gz |
bitbake: runqueue: Improve handling of failing setscene tasks with hard dependencies
If a setscene task has a hard dependency on a task like pseudo-native, its
expected that the setscene task will not run unless the dependency is met.
This adds code to ensure that is the case, otherwise a bug would show up
with a usecase like:
bitbake gnome-common
bitbake pseudo-native -c cleansstate
bitbake gnome-common -c clean
bitbake gnome-common
With the double wrapper script environment, we'd not see issues like
this as it would be masked. The problem theoretically affects code like
useradd too as well as anything using a sstate postinstall.
(Bitbake rev: c54e738e2b5dc0d8e6fd8e93b284ed96e7a83051)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index bd42538..dcf9004 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -1392,6 +1392,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute): sq_revdeps = [] sq_revdeps_new = [] sq_revdeps_squash = [] + self.sq_harddeps = [] # We need to construct a dependency graph for the setscene functions. Intermediate # dependencies between the setscene tasks only complicate the code. This code @@ -1504,6 +1505,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute): if taskid is None: bb.msg.fatal("RunQueue", "Task %s:%s depends upon non-existent task %s:%s" % (self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[realid]], self.rqdata.taskData.tasks_name[realid], dep, idependtask)) + self.sq_harddeps.append(self.rqdata.runq_setscene.index(taskid)) sq_revdeps_squash[self.rqdata.runq_setscene.index(task)].add(self.rqdata.runq_setscene.index(taskid)) # Have to zero this to avoid circular dependencies sq_revdeps_squash[self.rqdata.runq_setscene.index(taskid)] = set() @@ -1581,8 +1583,10 @@ class RunQueueExecuteScenequeue(RunQueueExecute): self.rq.state = runQueueSceneRun - def scenequeue_updatecounters(self, task): + def scenequeue_updatecounters(self, task, fail = False): for dep in self.sq_deps[task]: + if fail and task in self.sq_harddeps: + continue self.sq_revdeps2[dep].remove(task) if len(self.sq_revdeps2[dep]) == 0: self.runq_buildable[dep] = 1 @@ -1609,7 +1613,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute): self.stats.taskFailed() bb.event.fire(sceneQueueTaskFailed(task, self.stats, result, self), self.cfgData) self.scenequeue_notcovered.add(task) - self.scenequeue_updatecounters(task) + self.scenequeue_updatecounters(task, True) def task_failoutright(self, task): self.runq_running[task] = 1 @@ -1618,7 +1622,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute): self.stats.taskSkipped() index = self.rqdata.runq_setscene[task] self.scenequeue_notcovered.add(task) - self.scenequeue_updatecounters(task) + self.scenequeue_updatecounters(task, True) def task_skip(self, task): self.runq_running[task] = 1 |