summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-26 20:09:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-27 09:40:06 +0000
commitde7a6ab1bab97f60be1f0670d9ba6a41e9e67753 (patch)
tree8afe89a8ae94942013a929cd2d525e74bde617b9 /bitbake
parent9aeb38a5b813b4bb03c926e5dcead2124f935ff7 (diff)
downloadpoky-de7a6ab1bab97f60be1f0670d9ba6a41e9e67753.tar.gz
runqueue.py: Add inter setscene task dependency handling
This is being added to resolve setscene race issues where we do have particular dependencies required between setscene tasks. This allows specific dependencies to be specified. This allows us to fix the races in sstate with the useradd class in OE-Core. Any tasks being depended upon have their reverse dependencies cleared to ensure we don't have circular references. (Bitbake rev: e1b157d26374a70e6274edcb4c0b9f3bc48f765c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index a4030b3b93..7bf432083a 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1473,6 +1473,28 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
1473 elif len(sq_revdeps_new[task]) != 0: 1473 elif len(sq_revdeps_new[task]) != 0:
1474 bb.msg.fatal("RunQueue", "Something went badly wrong during scenequeue generation, aborting. Please report this problem.") 1474 bb.msg.fatal("RunQueue", "Something went badly wrong during scenequeue generation, aborting. Please report this problem.")
1475 1475
1476 # Resolve setscene inter-task dependencies
1477 # e.g. do_sometask_setscene[depends] = "targetname:do_someothertask_setscene"
1478 # Note that anything explicitly depended upon will have its reverse dependencies removed to avoid circular dependencies
1479 for task in self.rqdata.runq_setscene:
1480 realid = self.rqdata.taskData.gettask_id(self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]], self.rqdata.runq_task[task] + "_setscene", False)
1481 idepends = self.rqdata.taskData.tasks_idepends[realid]
1482 for (depid, idependtask) in idepends:
1483 if depid not in self.rqdata.taskData.build_targets:
1484 continue
1485
1486 depdata = self.rqdata.taskData.build_targets[depid][0]
1487 if depdata is None:
1488 continue
1489 dep = self.rqdata.taskData.fn_index[depdata]
1490 taskid = self.rqdata.get_task_id(self.rqdata.taskData.getfn_id(dep), idependtask.replace("_setscene", ""))
1491 if taskid is None:
1492 bb.msg.fatal("RunQueue", "Task %s depends upon nonexistant task %s:%s" % (self.rqdata.taskData.tasks_name[realid], dep, idependtask))
1493
1494 sq_revdeps_squash[self.rqdata.runq_setscene.index(task)].add(self.rqdata.runq_setscene.index(taskid))
1495 # Have to zero this to avoid circular dependencies
1496 sq_revdeps_squash[self.rqdata.runq_setscene.index(taskid)] = set()
1497
1476 #for task in xrange(len(sq_revdeps_squash)): 1498 #for task in xrange(len(sq_revdeps_squash)):
1477 # print "Task %s: %s.%s is %s " % (task, self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[self.rqdata.runq_setscene[task]]], self.rqdata.runq_task[self.rqdata.runq_setscene[task]] + "_setscene", sq_revdeps_squash[task]) 1499 # print "Task %s: %s.%s is %s " % (task, self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[self.rqdata.runq_setscene[task]]], self.rqdata.runq_task[self.rqdata.runq_setscene[task]] + "_setscene", sq_revdeps_squash[task])
1478 1500