summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/sstatesig.py
diff options
context:
space:
mode:
authorAlejandro Enedino Hernandez Samaniego <alejandro.enedino.hernandez-samaniego@xilinx.com>2018-07-25 09:05:51 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-01 10:07:22 +0100
commitb7c2c785806e53351340fe27270784115ea172b0 (patch)
treefa41cc5508624f2b05c061dbc72174931d9b93db /meta/lib/oe/sstatesig.py
parent666e0783525a298217787e3d2f1460c57c2f59ca (diff)
downloadpoky-b7c2c785806e53351340fe27270784115ea172b0.tar.gz
multiconfig: Enable multiconfig dependencies on oe-core
This patch enables multiconfig dependencies (mcdepends) to be used on recipes 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 bitbake.conf to enable mcdepends, and to sstatesig and staging.bbclass to avoid conflicts between packages from different multiconfigs. [YOCTO #10681] (From OE-Core rev: f71bfe833c657244d2fd07b3b71e86081d7d1c04) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/sstatesig.py')
-rw-r--r--meta/lib/oe/sstatesig.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 5dcc2f5cd6..18c5a353a2 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -150,16 +150,23 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
150 if recipename in self.unlockedrecipes: 150 if recipename in self.unlockedrecipes:
151 unlocked = True 151 unlocked = True
152 else: 152 else:
153 def get_mc(tid):
154 tid = tid.rsplit('.', 1)[0]
155 if tid.startswith('multiconfig:'):
156 elems = tid.split(':')
157 return elems[1]
153 def recipename_from_dep(dep): 158 def recipename_from_dep(dep):
154 # The dep entry will look something like 159 # The dep entry will look something like
155 # /path/path/recipename.bb.task, virtual:native:/p/foo.bb.task, 160 # /path/path/recipename.bb.task, virtual:native:/p/foo.bb.task,
156 # ... 161 # ...
162
157 fn = dep.rsplit('.', 1)[0] 163 fn = dep.rsplit('.', 1)[0]
158 return dataCache.pkg_fn[fn] 164 return dataCache.pkg_fn[fn]
159 165
166 mc = get_mc(fn)
160 # If any unlocked recipe is in the direct dependencies then the 167 # If any unlocked recipe is in the direct dependencies then the
161 # current recipe should be unlocked as well. 168 # current recipe should be unlocked as well.
162 depnames = [ recipename_from_dep(x) for x in deps ] 169 depnames = [ recipename_from_dep(x) for x in deps if mc == get_mc(x)]
163 if any(x in y for y in depnames for x in self.unlockedrecipes): 170 if any(x in y for y in depnames for x in self.unlockedrecipes):
164 self.unlockedrecipes[recipename] = '' 171 self.unlockedrecipes[recipename] = ''
165 unlocked = True 172 unlocked = True