summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-26 20:09:08 +0000
committerJoshua Lock <josh@linux.intel.com>2012-05-31 13:16:41 -0700
commit94c8d01eba5f8fe5a56c7682fd8d534c837e7e57 (patch)
tree18c40c9d580bc11aa5389d79db8ef77e1d7b65dc /bitbake
parente1e0dd932b029fff936747dfbde666604d206800 (diff)
downloadpoky-94c8d01eba5f8fe5a56c7682fd8d534c837e7e57.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> Signed-off-by: Joshua Lock <josh@linux.intel.com>
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 417de22a30..30c152e040 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1459,6 +1459,28 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
1459 elif len(sq_revdeps_new[task]) != 0: 1459 elif len(sq_revdeps_new[task]) != 0:
1460 bb.msg.fatal("RunQueue", "Something went badly wrong during scenequeue generation, aborting. Please report this problem.") 1460 bb.msg.fatal("RunQueue", "Something went badly wrong during scenequeue generation, aborting. Please report this problem.")
1461 1461
1462 # Resolve setscene inter-task dependencies
1463 # e.g. do_sometask_setscene[depends] = "targetname:do_someothertask_setscene"
1464 # Note that anything explicitly depended upon will have its reverse dependencies removed to avoid circular dependencies
1465 for task in self.rqdata.runq_setscene:
1466 realid = self.rqdata.taskData.gettask_id(self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]], self.rqdata.runq_task[task] + "_setscene", False)
1467 idepends = self.rqdata.taskData.tasks_idepends[realid]
1468 for (depid, idependtask) in idepends:
1469 if depid not in self.rqdata.taskData.build_targets:
1470 continue
1471
1472 depdata = self.rqdata.taskData.build_targets[depid][0]
1473 if depdata is None:
1474 continue
1475 dep = self.rqdata.taskData.fn_index[depdata]
1476 taskid = self.rqdata.get_task_id(self.rqdata.taskData.getfn_id(dep), idependtask.replace("_setscene", ""))
1477 if taskid is None:
1478 bb.msg.fatal("RunQueue", "Task %s depends upon nonexistant task %s:%s" % (self.rqdata.taskData.tasks_name[realid], dep, idependtask))
1479
1480 sq_revdeps_squash[self.rqdata.runq_setscene.index(task)].add(self.rqdata.runq_setscene.index(taskid))
1481 # Have to zero this to avoid circular dependencies
1482 sq_revdeps_squash[self.rqdata.runq_setscene.index(taskid)] = set()
1483
1462 #for task in xrange(len(sq_revdeps_squash)): 1484 #for task in xrange(len(sq_revdeps_squash)):
1463 # print "Task %s: %s.%s is %s " % (task, self.taskData.fn_index[self.runq_fnid[self.runq_setscene[task]]], self.runq_task[self.runq_setscene[task]] + "_setscene", sq_revdeps_squash[task]) 1485 # print "Task %s: %s.%s is %s " % (task, self.taskData.fn_index[self.runq_fnid[self.runq_setscene[task]]], self.runq_task[self.runq_setscene[task]] + "_setscene", sq_revdeps_squash[task])
1464 1486