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.

(From OE-Core rev: a94cc552dc764d3cc83ea638cb08b9a2a8829d2f)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Dongxiao Xu
2011-09-09 21:30:08 +08:00
committed by Richard Purdie
parent 719e1edaeb
commit 64ea342b4f
2 changed files with 32 additions and 14 deletions

View File

@@ -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

View File

@@ -58,6 +58,7 @@ fakeroot rootfs_rpm_do_rootfs () {
export INSTALL_PLATFORM_RPM="${TARGET_ARCH}"
export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}"
export INSTALL_PACKAGES_NORMAL_RPM="${PACKAGE_INSTALL}"
export INSTALL_PACKAGES_MULTILIB_RPM="${MULTILIB_PACKAGE_INSTALL}"
export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}"
export INSTALL_PACKAGES_LINGUAS_RPM="${LINGUAS_INSTALL}"
export INSTALL_PROVIDENAME_RPM=""
@@ -210,6 +211,7 @@ python () {
bb.data.setVar('RPM_POSTPROCESS_COMMANDS', '', d)
ml_package_archs = ""
ml_prefix_list = ""
multilibs = d.getVar('MULTILIBS', True) or ""
for ext in multilibs.split():
eext = ext.split(':')
@@ -221,6 +223,8 @@ python () {
localdata.setVar("MACHINE_ARCH", eext[1] + "_" + localdata.getVar("MACHINE_ARCH", False))
package_archs = localdata.getVar("PACKAGE_ARCHS", True) or ""
ml_package_archs += " " + package_archs
ml_prefix_list += " " + eext[1]
#bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1], localdata.getVar("PACKAGE_ARCHS", True) or "(none)", overrides))
bb.data.setVar('MULTILIB_PACKAGE_ARCHS', ml_package_archs, d)
bb.data.setVar('MULTILIB_PREFIX_LIST', ml_prefix_list, d)
}