summaryrefslogtreecommitdiffstats
path: root/meta
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
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')
-rw-r--r--meta/classes/staging.bbclass8
-rw-r--r--meta/conf/bitbake.conf2
-rw-r--r--meta/lib/oe/sstatesig.py9
3 files changed, 16 insertions, 3 deletions
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 41df883495..27b012ecbd 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -256,7 +256,7 @@ python extend_recipe_sysroot() {
256 workdir = d.getVar("WORKDIR") 256 workdir = d.getVar("WORKDIR")
257 #bb.warn(str(taskdepdata)) 257 #bb.warn(str(taskdepdata))
258 pn = d.getVar("PN") 258 pn = d.getVar("PN")
259 259 mc = d.getVar("BB_CURRENT_MC")
260 stagingdir = d.getVar("STAGING_DIR") 260 stagingdir = d.getVar("STAGING_DIR")
261 sharedmanifests = d.getVar("COMPONENTS_DIR") + "/manifests" 261 sharedmanifests = d.getVar("COMPONENTS_DIR") + "/manifests"
262 recipesysroot = d.getVar("RECIPE_SYSROOT") 262 recipesysroot = d.getVar("RECIPE_SYSROOT")
@@ -443,7 +443,13 @@ python extend_recipe_sysroot() {
443 443
444 msg_exists = [] 444 msg_exists = []
445 msg_adding = [] 445 msg_adding = []
446
446 for dep in configuredeps: 447 for dep in configuredeps:
448 if mc != 'default':
449 # We should not care about other multiconfigs
450 depmc = dep.split(':')[1]
451 if depmc != mc:
452 continue
447 c = setscenedeps[dep][0] 453 c = setscenedeps[dep][0]
448 if c not in installed: 454 if c not in installed:
449 continue 455 continue
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index e28f3c7311..f68954c511 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -877,7 +877,7 @@ BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc deps depends \
877 file-checksums python func task export unexport noexec nostamp dirs cleandirs \ 877 file-checksums python func task export unexport noexec nostamp dirs cleandirs \
878 sstate-lockfile-shared prefuncs postfuncs export_func deptask rdeptask \ 878 sstate-lockfile-shared prefuncs postfuncs export_func deptask rdeptask \
879 recrdeptask nodeprrecs stamp-extra-info sstate-outputdirs filename lineno \ 879 recrdeptask nodeprrecs stamp-extra-info sstate-outputdirs filename lineno \
880 progress" 880 progress mcdepends"
881 881
882MLPREFIX ??= "" 882MLPREFIX ??= ""
883MULTILIB_VARIANTS ??= "" 883MULTILIB_VARIANTS ??= ""
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