From: Saul Wold <sgw@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [RC Fixes 10/19] multilib: install MULTILIB_IMAGE_INSTALL
Date: Wed, 21 Sep 2011 02:39:26 -0700 [thread overview]
Message-ID: <9e71ee0c819600b712455fcf50502fbd4f44fd2c.1316597628.git.sgw@linux.intel.com> (raw)
In-Reply-To: <cover.1316597628.git.sgw@linux.intel.com>
In-Reply-To: <cover.1316597628.git.sgw@linux.intel.com>
From: Dongxiao Xu <dongxiao.xu@intel.com>
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>
---
meta/classes/package_rpm.bbclass | 42 +++++++++++++++++++++++++------------
meta/classes/rootfs_rpm.bbclass | 4 +++
2 files changed, 32 insertions(+), 14 deletions(-)
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 9ef1acd..4605ec8 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
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 7936d77..5ac6bca 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -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)
}
--
1.7.6
next prev parent reply other threads:[~2011-09-21 9:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-21 9:39 [RC Fixes 00/19] Fixes for Multi-Lib & other patches Saul Wold
2011-09-21 9:39 ` [RC Fixes 01/19] scripts/combo-layer: fix still overzealous regex in default hook script Saul Wold
2011-09-21 9:39 ` [RC Fixes 02/19] deb packages support: switch from /var/dpkg to /var/lib/dpkg Saul Wold
2011-09-21 9:39 ` [RC Fixes 03/19] libzypp: git repo moved to github Saul Wold
2011-09-21 9:39 ` [RC Fixes 04/19] sat-solver: " Saul Wold
2011-09-21 9:39 ` [RC Fixes 05/19] zypper: " Saul Wold
2011-09-21 9:39 ` [RC Fixes 06/19] distrodata: fix distro_check code Saul Wold
2011-09-21 9:39 ` [RC Fixes 07/19] distro tracking: Update Distro Aliases Saul Wold
2011-09-21 10:35 ` Koen Kooi
2011-09-21 9:39 ` [RC Fixes 08/19] avahi: Refactor recipe to move UI to avahi-ui Saul Wold
2011-09-21 9:39 ` [RC Fixes 09/19] rpm: add multilib prefix for archs under deploy/rpm Saul Wold
2011-09-21 9:39 ` Saul Wold [this message]
2011-09-21 9:39 ` [RC Fixes 11/19] Fix RPM dependencies Saul Wold
2011-09-21 9:39 ` [RC Fixes 12/19] Add a run-time dependency that eglibc support GNU_HASH Saul Wold
2011-09-21 9:39 ` [RC Fixes 13/19] Update python dependencies to be simply to "python" Saul Wold
2011-09-21 9:39 ` [RC Fixes 14/19] busybox: Enhance to add dynamic per-file provides Saul Wold
2011-09-21 9:39 ` [RC Fixes 15/19] multilib_global.bbclass: Fix non-multilib package provides Saul Wold
2011-09-21 9:39 ` [RC Fixes 16/19] Fix alsa-utils package dependencies Saul Wold
2011-09-21 9:39 ` [RC Fixes 17/19] oprofileui: Change avahi to avahi-ui depends Saul Wold
2011-09-21 9:39 ` [RC Fixes 18/19] libpng: avoid dangling link in libpng package Saul Wold
2011-09-21 9:39 ` [RC Fixes 19/19] libpng: add libpng12-dev packages Saul Wold
2011-09-21 12:44 ` [RC Fixes 00/19] Fixes for Multi-Lib & other patches Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9e71ee0c819600b712455fcf50502fbd4f44fd2c.1316597628.git.sgw@linux.intel.com \
--to=sgw@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox