summaryrefslogtreecommitdiffstats
path: root/meta/classes/multilib.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-09-24 16:25:37 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-27 09:44:54 +0100
commitea220105609de30498f4ba72f5aeec180de4be2f (patch)
tree0a0e16e1d0fd6c03fe8ed2af964e24ab0c3e1a0c /meta/classes/multilib.bbclass
parent511f7f9d0422fe1a896361b53179c9f642c1fc0b (diff)
downloadpoky-ea220105609de30498f4ba72f5aeec180de4be2f.tar.gz
multilib: Add support for cross-canadian multilib packages
Add support for the generation of cross-canadian packages. Each cross-canadian package has: PN = "pkg-cross-canadian-${TRANSLATED_TARGET_ARCH}" in order for that to be evaluated properly with multilibs enabled, it was necessary to detect both the presence of the cross-canadian packages and then update the vars using the OVERRIDE for the multilib. Additional checks were made to ensure that any dependency that sais "cross-canadian" did not get prefixed with the MLPREFIX. Also, make sure that even when building multilib cross-canadian packages, we only use the single SDK PACKAGE_ARCH, we don't want or need variants. (From OE-Core rev: 132a182e2f6c330aa645de42c1aeb386e43bddd3) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/multilib.bbclass')
-rw-r--r--meta/classes/multilib.bbclass18
1 files changed, 14 insertions, 4 deletions
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 3824f3b117..de6e59e39d 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -18,6 +18,13 @@ python multilib_virtclass_handler () {
18 e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False)) 18 e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
19 return 19 return
20 20
21 if bb.data.inherits_class('cross-canadian', e.data):
22 e.data.setVar("MLPREFIX", variant + "-")
23 override = ":virtclass-multilib-" + variant
24 e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
25 bb.data.update_data(e.data)
26 return
27
21 if bb.data.inherits_class('native', e.data): 28 if bb.data.inherits_class('native', e.data):
22 raise bb.parse.SkipPackage("We can't extend native recipes") 29 raise bb.parse.SkipPackage("We can't extend native recipes")
23 30
@@ -69,12 +76,16 @@ python __anonymous () {
69 if bb.data.inherits_class('image', d) or bb.data.inherits_class('populate_sdk_base', d): 76 if bb.data.inherits_class('image', d) or bb.data.inherits_class('populate_sdk_base', d):
70 return 77 return
71 78
79 clsextend.map_depends_variable("DEPENDS")
80 clsextend.map_variable("PROVIDES")
81
82 if bb.data.inherits_class('cross-canadian', d):
83 return
84
72 clsextend.rename_packages() 85 clsextend.rename_packages()
73 clsextend.rename_package_variables((d.getVar("PACKAGEVARS", True) or "").split()) 86 clsextend.rename_package_variables((d.getVar("PACKAGEVARS", True) or "").split())
74 87
75 clsextend.map_depends_variable("DEPENDS")
76 clsextend.map_packagevars() 88 clsextend.map_packagevars()
77 clsextend.map_variable("PROVIDES")
78 clsextend.map_regexp_variable("PACKAGES_DYNAMIC") 89 clsextend.map_regexp_variable("PACKAGES_DYNAMIC")
79 clsextend.map_variable("PACKAGE_INSTALL") 90 clsextend.map_variable("PACKAGE_INSTALL")
80 clsextend.map_variable("INITSCRIPT_PACKAGES") 91 clsextend.map_variable("INITSCRIPT_PACKAGES")
@@ -90,7 +101,7 @@ python do_package_qa_multilib() {
90 for i in values: 101 for i in values:
91 if i.startswith('virtual/'): 102 if i.startswith('virtual/'):
92 i = i[len('virtual/'):] 103 i = i[len('virtual/'):]
93 if (not i.startswith('kernel-module')) and (not i.startswith(mlprefix)): 104 if (not i.startswith('kernel-module')) and (not i.startswith(mlprefix)) and (not 'cross-canadian' in i):
94 candidates.append(i) 105 candidates.append(i)
95 if len(candidates) > 0: 106 if len(candidates) > 0:
96 bb.warn("Multilib QA Issue: %s package %s - suspicious values '%s' in %s" 107 bb.warn("Multilib QA Issue: %s package %s - suspicious values '%s' in %s"
@@ -109,4 +120,3 @@ python do_package_qa_multilib() {
109 check_mlprefix(pkg, 'RREPLACES', ml) 120 check_mlprefix(pkg, 'RREPLACES', ml)
110 check_mlprefix(pkg, 'RCONFLICTS', ml) 121 check_mlprefix(pkg, 'RCONFLICTS', ml)
111} 122}
112