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 22:33:05 +0000
commitf19652fc3f25406838b1ab69b1831929c39179fd (patch)
tree26b266f758597b82fb779bd0f73e899b20afd338 /bitbake
parentc67e44b839a09ba1854923b52b00f7e810b3720b (diff)
downloadpoky-f19652fc3f25406838b1ab69b1831929c39179fd.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: 7f157ea8ecf9ba259bb7e226cfd5f2870b7853a3) 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 843e468263..383c183235 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -49,6 +49,11 @@ def fn_from_tid(tid):
49def taskname_from_tid(tid): 49def taskname_from_tid(tid):
50 return tid.rsplit(":", 1)[1] 50 return tid.rsplit(":", 1)[1]
51 51
52def mc_from_tid(tid):
53 if tid.startswith('multiconfig:'):
54 return tid.split(':')[1]
55 return ""
56
52def split_tid(tid): 57def split_tid(tid):
53 (mc, fn, taskname, _) = split_tid_mcfn(tid) 58 (mc, fn, taskname, _) = split_tid_mcfn(tid)
54 return (mc, fn, taskname) 59 return (mc, fn, taskname)
@@ -2079,10 +2084,23 @@ class RunQueueExecuteTasks(RunQueueExecute):
2079 2084
2080 return True 2085 return True
2081 2086
2087 def filtermcdeps(self, task, deps):
2088 ret = set()
2089 mainmc = mc_from_tid(task)
2090 for dep in deps:
2091 mc = mc_from_tid(dep)
2092 if mc != mainmc:
2093 continue
2094 ret.add(dep)
2095 return ret
2096
2097 # We filter out multiconfig dependencies from taskdepdata we pass to the tasks
2098 # as most code can't handle them
2082 def build_taskdepdata(self, task): 2099 def build_taskdepdata(self, task):
2083 taskdepdata = {} 2100 taskdepdata = {}
2084 next = self.rqdata.runtaskentries[task].depends 2101 next = self.rqdata.runtaskentries[task].depends
2085 next.add(task) 2102 next.add(task)
2103 next = self.filtermcdeps(task, next)
2086 while next: 2104 while next:
2087 additional = [] 2105 additional = []
2088 for revdep in next: 2106 for revdep in next:
@@ -2092,6 +2110,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
2092 provides = self.rqdata.dataCaches[mc].fn_provides[taskfn] 2110 provides = self.rqdata.dataCaches[mc].fn_provides[taskfn]
2093 taskhash = self.rqdata.runtaskentries[revdep].hash 2111 taskhash = self.rqdata.runtaskentries[revdep].hash
2094 taskdepdata[revdep] = [pn, taskname, fn, deps, provides, taskhash] 2112 taskdepdata[revdep] = [pn, taskname, fn, deps, provides, taskhash]
2113 deps = self.filtermcdeps(task, deps)
2095 for revdep2 in deps: 2114 for revdep2 in deps:
2096 if revdep2 not in taskdepdata: 2115 if revdep2 not in taskdepdata:
2097 additional.append(revdep2) 2116 additional.append(revdep2)