summaryrefslogtreecommitdiffstats
path: root/meta/classes/multilib_global.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/multilib_global.bbclass')
-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: