summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/siggen.py
diff options
context:
space:
mode:
authorAlejandro Enedino Hernandez Samaniego <alejandro.enedino.hernandez-samaniego@xilinx.com>2018-07-25 09:01:01 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-01 10:07:22 +0100
commitb8730f68d22b9c1ebd012ffd7aedccd22cceb0da (patch)
tree18dcab42041ff11a5c554e1bc798f9df0fc158fc /bitbake/lib/bb/siggen.py
parent7df8a4f834e059e5beddc9f7bedec4f4a5a668d3 (diff)
downloadpoky-b8730f68d22b9c1ebd012ffd7aedccd22cceb0da.tar.gz
bitbake: bitbake: Add support for multiconfig dependencies
This patch adds the capability for tasks from different multiconfigs to depend on one another. These dependencies can be enabled using the following format: task[mcdepends] = "multiconfig:FROM-MC:TO-MC:PN:task-to-depend-on" For the sake of simplicity consider the following example: Assuming we have set up multiconfig builds, one for qemux86 and one for qemuarm, named x86 and arm respectively. Adding the following line to an image recipe (core-image-sato): do_image[mcdepends] = "multiconfig:x86:arm:core-image-minimal:do_rootfs" Would state that core-image-sato:do_image from x86 will depend on core-image-minimal:do_rootfs from arm so it can be executed. This patch makes modifications to: - cooker: To glue both multiconfigs in one place and make sure the dependencies can be provided. - taskdata: To parse and add a new kind of dependency (mcdepends) to the taskdata object. - runqueue: To differentiate tasks from different multiconfigs, add the specified dependencies to the corresponding tasks, and create a working runqueue that contains tasks from both multiconfigs. - siggen: To avoid looking for tasks from different multiconfigs on objects where they dont belong. The taskdata objects are still not aware of the concept of multiconfig, so each object doesnt know which multiconfig its building, hence why the mcdepends are added to all taskdata objects equally (we really dont expect many of these), but the actual dependencies are added only to the required tasks by the runqueue. (Bitbake rev: da8cb8633504bdc815bdcefc538340b9bce5065d) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/siggen.py')
-rw-r--r--bitbake/lib/bb/siggen.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index ab228e4148..e9bb51d736 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -193,15 +193,24 @@ class SignatureGeneratorBasic(SignatureGenerator):
193 return taint 193 return taint
194 194
195 def get_taskhash(self, fn, task, deps, dataCache): 195 def get_taskhash(self, fn, task, deps, dataCache):
196
197 mc = ''
198 if fn.startswith('multiconfig:'):
199 mc = fn.split(':')[1]
196 k = fn + "." + task 200 k = fn + "." + task
201
197 data = dataCache.basetaskhash[k] 202 data = dataCache.basetaskhash[k]
198 self.basehash[k] = data 203 self.basehash[k] = data
199 self.runtaskdeps[k] = [] 204 self.runtaskdeps[k] = []
200 self.file_checksum_values[k] = [] 205 self.file_checksum_values[k] = []
201 recipename = dataCache.pkg_fn[fn] 206 recipename = dataCache.pkg_fn[fn]
202
203 for dep in sorted(deps, key=clean_basepath): 207 for dep in sorted(deps, key=clean_basepath):
204 depname = dataCache.pkg_fn[self.pkgnameextract.search(dep).group('fn')] 208 pkgname = self.pkgnameextract.search(dep).group('fn')
209 if mc:
210 depmc = pkgname.split(':')[1]
211 if mc != depmc:
212 continue
213 depname = dataCache.pkg_fn[pkgname]
205 if not self.rundep_check(fn, recipename, task, dep, depname, dataCache): 214 if not self.rundep_check(fn, recipename, task, dep, depname, dataCache):
206 continue 215 continue
207 if dep not in self.taskhash: 216 if dep not in self.taskhash: