diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-23 10:10:32 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-25 22:32:24 +0000 |
commit | 7f157ea8ecf9ba259bb7e226cfd5f2870b7853a3 (patch) | |
tree | f3ba52c62a9150731483e6e2ce70ece657b9560c | |
parent | e39dbd72ef44eebae32f9fe3b75a1bf789605558 (diff) | |
download | bitbake-contrib-7f157ea8ecf9ba259bb7e226cfd5f2870b7853a3.tar.gz |
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]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/runqueue.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index 843e46826..383c18323 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -49,6 +49,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) @@ -2079,10 +2084,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: @@ -2092,6 +2110,7 @@ class RunQueueExecuteTasks(RunQueueExecute): provides = self.rqdata.dataCaches[mc].fn_provides[taskfn] taskhash = self.rqdata.runtaskentries[revdep].hash taskdepdata[revdep] = [pn, taskname, fn, deps, provides, taskhash] + deps = self.filtermcdeps(task, deps) for revdep2 in deps: if revdep2 not in taskdepdata: additional.append(revdep2) |