From 137a4626a7e8107fc8a71724d5124f44236293b9 Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Tue, 5 Jul 2011 13:55:41 +0800 Subject: image.bbclass: Added variables for multilib support. 1. Added MULTILIB_PACKAGE_INSTALL for multilib instances of packages to be installed in the rootfs. 2. MULTILIBRE_ALLOW_REP contains the regular expression to match the files allow to be replaced by the conflicting files. 3. MULTILIBRE_FORCE_SAME contains the regular expression to match the files allow to be replaced only if the conflicting files are identical. 4. Added shell function multilib_sanity_check() to check whether the overwring for multilib situation is allowed. Signed-off-by: Lianhao Lu --- meta/classes/image.bbclass | 54 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 79a56f0408..243baa9c35 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -5,13 +5,15 @@ inherit imagetest-${IMAGETEST} LICENSE = "MIT" PACKAGES = "" -RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL}" +MULTILIB_IMAGE_INSTALL ?= "" +RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${MULTILIB_IMAGE_INSTALL}" INHIBIT_DEFAULT_DEPS = "1" # "export IMAGE_BASENAME" not supported at this time IMAGE_BASENAME[export] = "1" export PACKAGE_INSTALL ?= "${IMAGE_INSTALL}" +export MULTILIB_PACKAGE_INSTALL ?= "${MULTILIB_IMAGE_INSTALL}" PACKAGE_INSTALL_ATTEMPTONLY ?= "" # Images are generally built explicitly, do not need to be part of world. @@ -91,6 +93,7 @@ do_rootfs[umask] = 022 fakeroot do_rootfs () { #set -x rm -rf ${IMAGE_ROOTFS} + rm -rf ${MULTILIB_TEMP_ROOTFS} mkdir -p ${IMAGE_ROOTFS} mkdir -p ${DEPLOY_DIR_IMAGE} @@ -166,6 +169,55 @@ log_check() { done } +MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|" +MULTILIBRE_FORCE_SAME =. "${sysconfdir}|${datadir}|" +MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py" +MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib" + +multilib_generate_python_file() { + cat >${MULTILIB_CHECK_FILE} <