summaryrefslogtreecommitdiffstats
path: root/meta/classes/multilib.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/multilib.bbclass')
-rw-r--r--meta/classes/multilib.bbclass32
1 files changed, 16 insertions, 16 deletions
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index d5a31287a8..498f7f5735 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -1,20 +1,20 @@
1python multilib_virtclass_handler () { 1python multilib_virtclass_handler () {
2 cls = e.data.getVar("BBEXTENDCURR", True) 2 cls = e.data.getVar("BBEXTENDCURR")
3 variant = e.data.getVar("BBEXTENDVARIANT", True) 3 variant = e.data.getVar("BBEXTENDVARIANT")
4 if cls != "multilib" or not variant: 4 if cls != "multilib" or not variant:
5 return 5 return
6 6
7 e.data.setVar('STAGING_KERNEL_DIR', e.data.getVar('STAGING_KERNEL_DIR', True)) 7 e.data.setVar('STAGING_KERNEL_DIR', e.data.getVar('STAGING_KERNEL_DIR'))
8 8
9 # There should only be one kernel in multilib configs 9 # There should only be one kernel in multilib configs
10 # We also skip multilib setup for module packages. 10 # We also skip multilib setup for module packages.
11 provides = (e.data.getVar("PROVIDES", True) or "").split() 11 provides = (e.data.getVar("PROVIDES") or "").split()
12 if "virtual/kernel" in provides or bb.data.inherits_class('module-base', e.data): 12 if "virtual/kernel" in provides or bb.data.inherits_class('module-base', e.data):
13 raise bb.parse.SkipPackage("We shouldn't have multilib variants for the kernel") 13 raise bb.parse.SkipPackage("We shouldn't have multilib variants for the kernel")
14 14
15 save_var_name=e.data.getVar("MULTILIB_SAVE_VARNAME", True) or "" 15 save_var_name=e.data.getVar("MULTILIB_SAVE_VARNAME") or ""
16 for name in save_var_name.split(): 16 for name in save_var_name.split():
17 val=e.data.getVar(name, True) 17 val=e.data.getVar(name)
18 if val: 18 if val:
19 e.data.setVar(name + "_MULTILIB_ORIGINAL", val) 19 e.data.setVar(name + "_MULTILIB_ORIGINAL", val)
20 20
@@ -26,7 +26,7 @@ python multilib_virtclass_handler () {
26 if bb.data.inherits_class('image', e.data): 26 if bb.data.inherits_class('image', e.data):
27 e.data.setVar("MLPREFIX", variant + "-") 27 e.data.setVar("MLPREFIX", variant + "-")
28 e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False)) 28 e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
29 e.data.setVar('SDKTARGETSYSROOT', e.data.getVar('SDKTARGETSYSROOT', True)) 29 e.data.setVar('SDKTARGETSYSROOT', e.data.getVar('SDKTARGETSYSROOT'))
30 target_vendor = e.data.getVar("TARGET_VENDOR_" + "virtclass-multilib-" + variant, False) 30 target_vendor = e.data.getVar("TARGET_VENDOR_" + "virtclass-multilib-" + variant, False)
31 if target_vendor: 31 if target_vendor:
32 e.data.setVar("TARGET_VENDOR", target_vendor) 32 e.data.setVar("TARGET_VENDOR", target_vendor)
@@ -50,7 +50,7 @@ python multilib_virtclass_handler () {
50 50
51 51
52 # Expand this since this won't work correctly once we set a multilib into place 52 # Expand this since this won't work correctly once we set a multilib into place
53 e.data.setVar("ALL_MULTILIB_PACKAGE_ARCHS", e.data.getVar("ALL_MULTILIB_PACKAGE_ARCHS", True)) 53 e.data.setVar("ALL_MULTILIB_PACKAGE_ARCHS", e.data.getVar("ALL_MULTILIB_PACKAGE_ARCHS"))
54 54
55 override = ":virtclass-multilib-" + variant 55 override = ":virtclass-multilib-" + variant
56 56
@@ -60,7 +60,7 @@ python multilib_virtclass_handler () {
60 60
61 # Expand the WHITELISTs with multilib prefix 61 # Expand the WHITELISTs with multilib prefix
62 for whitelist in ["WHITELIST_GPL-3.0", "LGPLv2_WHITELIST_GPL-3.0"]: 62 for whitelist in ["WHITELIST_GPL-3.0", "LGPLv2_WHITELIST_GPL-3.0"]:
63 pkgs = e.data.getVar(whitelist, True) 63 pkgs = e.data.getVar(whitelist)
64 for pkg in pkgs.split(): 64 for pkg in pkgs.split():
65 pkgs += " " + variant + "-" + pkg 65 pkgs += " " + variant + "-" + pkg
66 e.data.setVar(whitelist, pkgs) 66 e.data.setVar(whitelist, pkgs)
@@ -78,7 +78,7 @@ multilib_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
78STAGINGCC_prepend = "${BBEXTENDVARIANT}-" 78STAGINGCC_prepend = "${BBEXTENDVARIANT}-"
79 79
80python __anonymous () { 80python __anonymous () {
81 variant = d.getVar("BBEXTENDVARIANT", True) 81 variant = d.getVar("BBEXTENDVARIANT")
82 82
83 import oe.classextend 83 import oe.classextend
84 84
@@ -88,7 +88,7 @@ python __anonymous () {
88 clsextend.map_depends_variable("PACKAGE_INSTALL") 88 clsextend.map_depends_variable("PACKAGE_INSTALL")
89 clsextend.map_depends_variable("LINGUAS_INSTALL") 89 clsextend.map_depends_variable("LINGUAS_INSTALL")
90 clsextend.map_depends_variable("RDEPENDS") 90 clsextend.map_depends_variable("RDEPENDS")
91 pinstall = d.getVar("LINGUAS_INSTALL", True) + " " + d.getVar("PACKAGE_INSTALL", True) 91 pinstall = d.getVar("LINGUAS_INSTALL") + " " + d.getVar("PACKAGE_INSTALL")
92 d.setVar("PACKAGE_INSTALL", pinstall) 92 d.setVar("PACKAGE_INSTALL", pinstall)
93 d.setVar("LINGUAS_INSTALL", "") 93 d.setVar("LINGUAS_INSTALL", "")
94 # FIXME, we need to map this to something, not delete it! 94 # FIXME, we need to map this to something, not delete it!
@@ -104,7 +104,7 @@ python __anonymous () {
104 return 104 return
105 105
106 clsextend.rename_packages() 106 clsextend.rename_packages()
107 clsextend.rename_package_variables((d.getVar("PACKAGEVARS", True) or "").split()) 107 clsextend.rename_package_variables((d.getVar("PACKAGEVARS") or "").split())
108 108
109 clsextend.map_packagevars() 109 clsextend.map_packagevars()
110 clsextend.map_regexp_variable("PACKAGES_DYNAMIC") 110 clsextend.map_regexp_variable("PACKAGES_DYNAMIC")
@@ -119,7 +119,7 @@ PACKAGEFUNCS_append = " do_package_qa_multilib"
119python do_package_qa_multilib() { 119python do_package_qa_multilib() {
120 120
121 def check_mlprefix(pkg, var, mlprefix): 121 def check_mlprefix(pkg, var, mlprefix):
122 values = bb.utils.explode_deps(d.getVar('%s_%s' % (var, pkg), True) or d.getVar(var, True) or "") 122 values = bb.utils.explode_deps(d.getVar('%s_%s' % (var, pkg), True) or d.getVar(var) or "")
123 candidates = [] 123 candidates = []
124 for i in values: 124 for i in values:
125 if i.startswith('virtual/'): 125 if i.startswith('virtual/'):
@@ -130,14 +130,14 @@ python do_package_qa_multilib() {
130 candidates.append(i) 130 candidates.append(i)
131 if len(candidates) > 0: 131 if len(candidates) > 0:
132 msg = "%s package %s - suspicious values '%s' in %s" \ 132 msg = "%s package %s - suspicious values '%s' in %s" \
133 % (d.getVar('PN', True), pkg, ' '.join(candidates), var) 133 % (d.getVar('PN'), pkg, ' '.join(candidates), var)
134 package_qa_handle_error("multilib", msg, d) 134 package_qa_handle_error("multilib", msg, d)
135 135
136 ml = d.getVar('MLPREFIX', True) 136 ml = d.getVar('MLPREFIX')
137 if not ml: 137 if not ml:
138 return 138 return
139 139
140 packages = d.getVar('PACKAGES', True) 140 packages = d.getVar('PACKAGES')
141 for pkg in packages.split(): 141 for pkg in packages.split():
142 check_mlprefix(pkg, 'RDEPENDS', ml) 142 check_mlprefix(pkg, 'RDEPENDS', ml)
143 check_mlprefix(pkg, 'RPROVIDES', ml) 143 check_mlprefix(pkg, 'RPROVIDES', ml)