summaryrefslogtreecommitdiffstats
path: root/meta/lib
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:06:46 +0100
commitf71bfe833c657244d2fd07b3b71e86081d7d1c04 (patch)
treeb3c8067ca18315fad64f29332471ea440daee881 /meta/lib
parent51a09ba2729a840a9f2f87b68c7f50a3e6ac0d04 (diff)
downloadopenembedded-core-f71bfe833c657244d2fd07b3b71e86081d7d1c04.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] Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-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):
if recipename in self.unlockedrecipes:
unlocked = True
else:
+ def get_mc(tid):
+ tid = tid.rsplit('.', 1)[0]
+ if tid.startswith('multiconfig:'):
+ elems = tid.split(':')
+ return elems[1]
def recipename_from_dep(dep):
# The dep entry will look something like
# /path/path/recipename.bb.task, virtual:native:/p/foo.bb.task,
# ...
+
fn = dep.rsplit('.', 1)[0]
return dataCache.pkg_fn[fn]
+ mc = get_mc(fn)
# If any unlocked recipe is in the direct dependencies then the
# current recipe should be unlocked as well.
- depnames = [ recipename_from_dep(x) for x in deps ]
+ depnames = [ recipename_from_dep(x) for x in deps if mc == get_mc(x)]
if any(x in y for y in depnames for x in self.unlockedrecipes):
self.unlockedrecipes[recipename] = ''
unlocked = True