From 7736862a74c92fe1afe42e170822be13117575c2 Mon Sep 17 00:00:00 2001 From: Dongxiao Xu Date: Tue, 8 Nov 2011 14:19:37 +0800 Subject: multilib: Drop MULTILIB_IMAGE_INSTALL There should just be a single IMAGE_INSTALL variable. If the package backends need this split into different multilib components they should be responsible for doing this, not the user. This commit removes the MULTILIB_IMAGE_INSTALL variable. [YOCTO #1564] Signed-off-by: Dongxiao Xu Signed-off-by: Richard Purdie --- meta/classes/package_ipk.bbclass | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'meta/classes/package_ipk.bbclass') diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index c97e36eeb2..d41b40d2c5 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass @@ -86,12 +86,34 @@ package_tryout_install_multilib_ipk() { fi done } + +split_multilib_packages() { + INSTALL_PACKAGES_NORMAL_IPK="" + INSTALL_PACKAGES_MULTILIB_IPK="" + for pkg in ${INSTALL_PACKAGES_IPK}; do + is_multilib=0 + for item in ${MULTILIB_VARIANTS}; do + local pkgname_prefix="${item}-" + if [ ${pkg:0:${#pkgname_prefix}} == ${pkgname_prefix} ]; then + is_multilib=1 + break + fi + done + + if [ ${is_multilib} = 0 ]; then + INSTALL_PACKAGES_NORMAL_IPK="${INSTALL_PACKAGES_NORMAL_IPK} ${pkg}" + else + INSTALL_PACKAGES_MULTILIB_IPK="${INSTALL_PACKAGES_MULTILIB_IPK} ${pkg}" + fi + done +} + # # install a bunch of packages using opkg # the following shell variables needs to be set before calling this func: # INSTALL_ROOTFS_IPK - install root dir # INSTALL_CONF_IPK - configuration file -# INSTALL_PACKAGES_NORMAL_IPK - packages to be installed +# INSTALL_PACKAGES_IPK - packages to be installed # INSTALL_PACKAGES_ATTEMPTONLY_IPK - packages attemped to be installed only # INSTALL_PACKAGES_LINGUAS_IPK - additional packages for uclibc # INSTALL_TASK_IPK - task name @@ -100,12 +122,15 @@ package_install_internal_ipk() { local target_rootfs="${INSTALL_ROOTFS_IPK}" local conffile="${INSTALL_CONF_IPK}" - local package_to_install="${INSTALL_PACKAGES_NORMAL_IPK}" local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_IPK}" local package_linguas="${INSTALL_PACKAGES_LINGUAS_IPK}" - local package_multilib="${INSTALL_PACKAGES_MULTILIB_IPK}" local task="${INSTALL_TASK_IPK}" + split_multilib_packages + + local package_to_install="${INSTALL_PACKAGES_NORMAL_IPK}" + local package_multilib="${INSTALL_PACKAGES_MULTILIB_IPK}" + mkdir -p ${target_rootfs}${localstatedir}/lib/opkg/ local ipkg_args="-f ${conffile} -o ${target_rootfs} --force-overwrite" -- cgit v1.2.3