From 0b19e52b85cbd9554df4df9fae50b3b193376aaa Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 23 Feb 2019 10:10:32 +0000 Subject: bitbake: runqueue: Filter out multiconfig dependencies from BB_TASKDEPDATA The consumers of BB_TASKDEPDATA in OE metadata can't cope with multiconfig dependencies. The choice is either to start adding code to each of them to filter out multiconfig dependencies, or do this at source. After consideration we've decided to do this at source as doing otherwise is code duplication and error prone and in any case we've looked at, they don't make sense. [YOCTO #13090] [YOCTO #13130] (Bitbake rev: 531dcd221a10853f45cc057b52bb2d5083e0ee42) Signed-off-by: Richard Purdie --- bitbake/lib/bb/runqueue.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'bitbake') diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 71f178de4f..329cda33a4 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -50,6 +50,11 @@ def fn_from_tid(tid): def taskname_from_tid(tid): return tid.rsplit(":", 1)[1] +def mc_from_tid(tid): + if tid.startswith('multiconfig:'): + return tid.split(':')[1] + return "" + def split_tid(tid): (mc, fn, taskname, _) = split_tid_mcfn(tid) return (mc, fn, taskname) @@ -2102,10 +2107,23 @@ class RunQueueExecuteTasks(RunQueueExecute): return True + def filtermcdeps(self, task, deps): + ret = set() + mainmc = mc_from_tid(task) + for dep in deps: + mc = mc_from_tid(dep) + if mc != mainmc: + continue + ret.add(dep) + return ret + + # We filter out multiconfig dependencies from taskdepdata we pass to the tasks + # as most code can't handle them def build_taskdepdata(self, task): taskdepdata = {} next = self.rqdata.runtaskentries[task].depends next.add(task) + next = self.filtermcdeps(task, next) while next: additional = [] for revdep in next: @@ -2115,6 +2133,7 @@ class RunQueueExecuteTasks(RunQueueExecute): provides = self.rqdata.dataCaches[mc].fn_provides[taskfn] taskhash = self.rqdata.runtaskentries[revdep].hash unihash = self.rqdata.runtaskentries[revdep].unihash + deps = self.filtermcdeps(task, deps) taskdepdata[revdep] = [pn, taskname, fn, deps, provides, taskhash, unihash] for revdep2 in deps: if revdep2 not in taskdepdata: -- cgit v1.2.3-54-g00ecf