summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-23 10:10:32 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-25 10:43:31 +0000
commit0b19e52b85cbd9554df4df9fae50b3b193376aaa (patch)
tree886ba2eee6f18b06841546447af68b3b33bc338a /bitbake
parent0929ec267c0d261b20b912220ddac6a1e4651ada (diff)
downloadpoky-0b19e52b85cbd9554df4df9fae50b3b193376aaa.tar.gz
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py19
1 files changed, 19 insertions, 0 deletions
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):
50def taskname_from_tid(tid): 50def taskname_from_tid(tid):
51 return tid.rsplit(":", 1)[1] 51 return tid.rsplit(":", 1)[1]
52 52
53def mc_from_tid(tid):
54 if tid.startswith('multiconfig:'):
55 return tid.split(':')[1]
56 return ""
57
53def split_tid(tid): 58def split_tid(tid):
54 (mc, fn, taskname, _) = split_tid_mcfn(tid) 59 (mc, fn, taskname, _) = split_tid_mcfn(tid)
55 return (mc, fn, taskname) 60 return (mc, fn, taskname)
@@ -2102,10 +2107,23 @@ class RunQueueExecuteTasks(RunQueueExecute):
2102 2107
2103 return True 2108 return True
2104 2109
2110 def filtermcdeps(self, task, deps):
2111 ret = set()
2112 mainmc = mc_from_tid(task)
2113 for dep in deps:
2114 mc = mc_from_tid(dep)
2115 if mc != mainmc:
2116 continue
2117 ret.add(dep)
2118 return ret
2119
2120 # We filter out multiconfig dependencies from taskdepdata we pass to the tasks
2121 # as most code can't handle them
2105 def build_taskdepdata(self, task): 2122 def build_taskdepdata(self, task):
2106 taskdepdata = {} 2123 taskdepdata = {}
2107 next = self.rqdata.runtaskentries[task].depends 2124 next = self.rqdata.runtaskentries[task].depends
2108 next.add(task) 2125 next.add(task)
2126 next = self.filtermcdeps(task, next)
2109 while next: 2127 while next:
2110 additional = [] 2128 additional = []
2111 for revdep in next: 2129 for revdep in next:
@@ -2115,6 +2133,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
2115 provides = self.rqdata.dataCaches[mc].fn_provides[taskfn] 2133 provides = self.rqdata.dataCaches[mc].fn_provides[taskfn]
2116 taskhash = self.rqdata.runtaskentries[revdep].hash 2134 taskhash = self.rqdata.runtaskentries[revdep].hash
2117 unihash = self.rqdata.runtaskentries[revdep].unihash 2135 unihash = self.rqdata.runtaskentries[revdep].unihash
2136 deps = self.filtermcdeps(task, deps)
2118 taskdepdata[revdep] = [pn, taskname, fn, deps, provides, taskhash, unihash] 2137 taskdepdata[revdep] = [pn, taskname, fn, deps, provides, taskhash, unihash]
2119 for revdep2 in deps: 2138 for revdep2 in deps:
2120 if revdep2 not in taskdepdata: 2139 if revdep2 not in taskdepdata: