summaryrefslogtreecommitdiff
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2011-09-09 21:30:08 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-21 13:32:33 +0100
commita94cc552dc764d3cc83ea638cb08b9a2a8829d2f (patch)
treec32c0754eec6999c51c3a7be0a1b1c74adbb8032 /meta/classes/package_rpm.bbclass
parent921f984aa65e23d5a8ec5c2e58a96cb8a4790b5d (diff)
downloadopenembedded-core-a94cc552dc764d3cc83ea638cb08b9a2a8829d2f.tar.gz
openembedded-core-a94cc552dc764d3cc83ea638cb08b9a2a8829d2f.tar.bz2
openembedded-core-a94cc552dc764d3cc83ea638cb08b9a2a8829d2f.tar.xz
openembedded-core-a94cc552dc764d3cc83ea638cb08b9a2a8829d2f.zip
multilib: install MULTILIB_IMAGE_INSTALL
If user set MULTILIB_IMAGE_INSTALL, we need to install those multitlib packages into the final image. Also fix the logic in handling multilib prefix. For certain case like a normal image contains several multilib libraries, the image recipe isn't extended with MLPREFIX, therefore we need to enumerate the possible multilib prefixes and compare them with package prefixes. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass42
1 files changed, 28 insertions, 14 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 9ef1acd47..4605ec8a1 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -166,7 +166,7 @@ package_install_internal_rpm () {
local platform="${INSTALL_PLATFORM_RPM}"
local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}"
local confbase="${INSTALL_CONFBASE_RPM}"
- local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM}"
+ local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM} ${INSTALL_PACKAGES_MULTILIB_RPM}"
local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}"
local package_linguas="${INSTALL_PACKAGES_LINGUAS_RPM}"
local providename="${INSTALL_PROVIDENAME_RPM}"
@@ -210,10 +210,15 @@ package_install_internal_rpm () {
echo "Processing $pkg..."
archvar=base_archs
- ml_pkg=$(echo ${pkg} | sed "s,^${MLPREFIX}\(.*\),\1,")
- if [ "${ml_pkg}" != "${pkg}" ]; then
- archvar=ml_archs
- fi
+ ml_prefix=`echo ${pkg} | cut -d'-' -f1`
+ ml_pkg=$pkg
+ for i in ${MULTILIB_PREFIX_LIST} ; do
+ if [ ${ml_prefix} == ${i} ]; then
+ ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
+ archvar=ml_archs
+ break
+ fi
+ done
pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg})
if [ -z "$pkg_name" ]; then
@@ -224,16 +229,20 @@ package_install_internal_rpm () {
done
fi
fi
-
if [ ! -z "${package_to_install}" ]; then
for pkg in ${package_to_install} ; do
echo "Processing $pkg..."
archvar=base_archs
- ml_pkg=$(echo ${pkg} | sed "s,^${MLPREFIX}\(.*\),\1,")
- if [ "${ml_pkg}" != "${pkg}" ]; then
- archvar=ml_archs
- fi
+ ml_prefix=`echo ${pkg} | cut -d'-' -f1`
+ ml_pkg=$pkg
+ for i in ${MULTILIB_PREFIX_LIST} ; do
+ if [ ${ml_prefix} == ${i} ]; then
+ ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
+ archvar=ml_archs
+ break
+ fi
+ done
pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg})
if [ -z "$pkg_name" ]; then
@@ -258,10 +267,15 @@ package_install_internal_rpm () {
for pkg in ${package_attemptonly} ; do
echo "Processing $pkg..."
archvar=base_archs
- ml_pkg=$(echo ${pkg} | sed "s,^${MLPREFIX}\(.*\),\1,")
- if [ "${ml_pkg}" != "${pkg}" ]; then
- archvar=ml_archs
- fi
+ ml_prefix=`echo ${pkg} | cut -d'-' -f1`
+ ml_pkg=$pkg
+ for i in ${MULTILIB_PREFIX_LIST} ; do
+ if [ ${ml_prefix} == ${i} ]; then
+ ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
+ archvar=ml_archs
+ break
+ fi
+ done
pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg})
if [ -z "$pkg_name" ]; then