summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-09-20 12:06:54 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-21 13:42:52 +0100
commita0530fc847066fd1eb359216b9d49059146e7107 (patch)
tree808a9bab98492547e6494eea464cf1dea009502f /meta/classes
parent87849d842066f2e16582e40c8dc945b3ae762196 (diff)
downloadpoky-a0530fc847066fd1eb359216b9d49059146e7107.tar.gz
multilib_global.bbclass: Fix non-multilib package provides
In non-multilib packages, configured in a multilib configuration we need to adjust the system provides and rprovides to include the virtual multilib variant. This resolves a problem introduced in the 329d864f9bbf94ad3aae8df43d63fe10e4237e4f commit. Where "allarch" packages were suddenly providing all variants of an object. (From OE-Core rev: 66fa6b7e13fbcc5f75fb1b8aa3aedfbdbc148688) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/multilib_global.bbclass27
1 files changed, 22 insertions, 5 deletions
diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass
index ed14565a64..cd22163894 100644
--- a/meta/classes/multilib_global.bbclass
+++ b/meta/classes/multilib_global.bbclass
@@ -6,16 +6,33 @@ python multilib_virtclass_handler_global () {
6 6
7 if isinstance(e, bb.event.RecipeParsed) and not variant: 7 if isinstance(e, bb.event.RecipeParsed) and not variant:
8 if bb.data.inherits_class('kernel', e.data) or bb.data.inherits_class('module-base', e.data) or bb.data.inherits_class('allarch', e.data): 8 if bb.data.inherits_class('kernel', e.data) or bb.data.inherits_class('module-base', e.data) or bb.data.inherits_class('allarch', e.data):
9 origprovs = provs = e.data.getVar("PROVIDES", True)
10 rprovs = e.data.getVar("RPROVIDES", True)
11 variants = (e.data.getVar("MULTILIB_VARIANTS", True) or "").split() 9 variants = (e.data.getVar("MULTILIB_VARIANTS", True) or "").split()
10
11 # Process PROVIDES
12 origprovs = provs = e.data.getVar("PROVIDES", True) or ""
12 for variant in variants: 13 for variant in variants:
13 provs = provs + " " + multilib_map_variable("PROVIDES", variant, e.data) 14 provs = provs + " " + multilib_map_variable("PROVIDES", variant, e.data)
14 for pkg in e.data.getVar("PACKAGES", True).split(): 15 # Reset to original value so next time around multilib_map_variable works properly
15 rprovs = rprovs + " " + variant + "-" + pkg
16 e.data.setVar("PROVIDES", origprovs) 16 e.data.setVar("PROVIDES", origprovs)
17 e.data.setVar("PROVIDES", provs) 17 e.data.setVar("PROVIDES", provs)
18
19 # Process RPROVIDES
20 origrprovs = rprovs = e.data.getVar("RPROVIDES", True) or ""
21 for variant in variants:
22 rprovs = rprovs + " " + multilib_map_variable("RPROVIDES", variant, e.data)
23 # Reset to original value so next time around multilib_map_variable works properly
24 e.data.setVar("RPROVIDES", origrprovs)
18 e.data.setVar("RPROVIDES", rprovs) 25 e.data.setVar("RPROVIDES", rprovs)
26
27 # Process RPROVIDES_${PN}...
28 for pkg in (e.data.getVar("PACKAGES", True) or "").split():
29 origrprovs = rprovs = e.data.getVar("RPROVIDES_%s" % pkg, True) or ""
30 for variant in variants:
31 rprovs = rprovs + " " + multilib_map_variable("RPROVIDES_%s" % pkg, variant, e.data)
32 rprovs = rprovs + " " + variant + "-" + pkg
33 # Reset to original value so next time around multilib_map_variable works properly
34 e.data.setVar("RPROVIDES_%s" % pkg, origrprovs)
35 e.data.setVar("RPROVIDES_%s" % pkg, rprovs)
19} 36}
20 37
21addhandler multilib_virtclass_handler_global 38addhandler multilib_virtclass_handler_global
@@ -35,7 +52,7 @@ def multilib_extend_name(variant, name):
35def multilib_map_variable(varname, variant, d): 52def multilib_map_variable(varname, variant, d):
36 var = d.getVar(varname, True) 53 var = d.getVar(varname, True)
37 if not var: 54 if not var:
38 return 55 return ""
39 var = var.split() 56 var = var.split()
40 newvar = [] 57 newvar = []
41 for v in var: 58 for v in var: