summaryrefslogtreecommitdiffstats
path: root/lib/bb/runqueue.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-14 16:03:45 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-14 17:08:02 +0100
commitc54e738e2b5dc0d8e6fd8e93b284ed96e7a83051 (patch)
tree1c6e7b5cde0ac08e974961e69ec83aad2a38d27e /lib/bb/runqueue.py
parente171a363913a86e56266f4c9d107110c7f5221e3 (diff)
downloadbitbake-c54e738e2b5dc0d8e6fd8e93b284ed96e7a83051.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/runqueue.py')
-rw-r--r--lib/bb/runqueue.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index bd4253868..dcf90044a 100644
--- a/lib/bb/runqueue.py
+++ b/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