From 00c38774ef0232cc2be924ed8e59220e7c452096 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 22 Sep 2011 22:15:58 +0100 Subject: multilib.bbclass: Partially fix multlib image targets This patch partially fixes problems when building multilib extended images such as libXX-core-image-minimal. Its not a perfect/complete solution but works much better than any previous code did. [YOCTO #1496] (partial) [YOCTO #1497] (partial) [YOCTO #1498] (partial) Signed-off-by: Richard Purdie --- meta/classes/crosssdk.bbclass | 1 + meta/classes/multilib.bbclass | 13 +++++++++++++ meta/classes/nativesdk.bbclass | 1 + 3 files changed, 15 insertions(+) diff --git a/meta/classes/crosssdk.bbclass b/meta/classes/crosssdk.bbclass index 5cfa43b3d..83753b4f7 100644 --- a/meta/classes/crosssdk.bbclass +++ b/meta/classes/crosssdk.bbclass @@ -18,6 +18,7 @@ target_includedir = "${SDKPATHNATIVE}${includedir_nativesdk}" target_base_libdir = "${SDKPATHNATIVE}${base_libdir_nativesdk}" target_prefix = "${SDKPATHNATIVE}${prefix_nativesdk}" target_exec_prefix = "${SDKPATHNATIVE}${exec_prefix_nativesdk}" +baselib = "lib" do_populate_sysroot[stamp-extra-info] = "" do_package[stamp-extra-info] = "" diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass index 138dd27a6..98f69116b 100644 --- a/meta/classes/multilib.bbclass +++ b/meta/classes/multilib.bbclass @@ -11,6 +11,10 @@ python multilib_virtclass_handler () { 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): raise bb.parse.SkipPackage("We shouldn't have multilib variants for the kernel") + if bb.data.inherits_class('image', e.data): + e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False)) + return + save_var_name=e.data.getVar("MULTILIB_SAVE_VARNAME", True) or "" for name in save_var_name.split(): val=e.data.getVar(name, True) @@ -48,6 +52,15 @@ python __anonymous () { newdeps.append(multilib_extend_name(variant, dep)) d.setVar(varname, " ".join(newdeps)) + if bb.data.inherits_class('image', d): + map_dependencies("PACKAGE_INSTALL", d) + pinstall = d.getVar("PACKAGE_INSTALL", True) + " " + d.getVar("MULTILIB_PACKAGE_INSTALL", False) + d.setVar("MULTILIB_PACKAGE_INSTALL", pinstall) + d.setVar("PACKAGE_INSTALL", "") + # FIXME, we need to map this to something, not delete it! + d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", "") + return + pkgs_mapping = [] for pkg in (d.getVar("PACKAGES", True) or "").split(): if pkg.startswith(variant): diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass index a495555b3..bb59ac57a 100644 --- a/meta/classes/nativesdk.bbclass +++ b/meta/classes/nativesdk.bbclass @@ -48,6 +48,7 @@ LDFLAGS = "${BUILDSDK_LDFLAGS}" base_prefix = "${SDKPATHNATIVE}" prefix = "${SDKPATHNATIVE}${prefix_nativesdk}" exec_prefix = "${SDKPATHNATIVE}${prefix_nativesdk}" +baselib = "lib" FILES_${PN} += "${prefix}" FILES_${PN}-dbg += "${prefix}/.debug \ -- cgit v1.2.3