diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2011-09-09 21:30:08 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-21 13:42:51 +0100 |
commit | 64ea342b4f7fa448f4f65e26c7976f88d02330b1 (patch) | |
tree | 6cd8d7769d39abee5f6ef1f641c9189001429c4d /meta/classes | |
parent | 719e1edaebb13b8626a7dd85cdc8680f00a6b4ac (diff) | |
download | poky-64ea342b4f7fa448f4f65e26c7976f88d02330b1.tar.gz |
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>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 42 | ||||
-rw-r--r-- | 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 9ef1acd475..4605ec8a1e 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -166,7 +166,7 @@ package_install_internal_rpm () { | |||
166 | local platform="${INSTALL_PLATFORM_RPM}" | 166 | local platform="${INSTALL_PLATFORM_RPM}" |
167 | local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}" | 167 | local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}" |
168 | local confbase="${INSTALL_CONFBASE_RPM}" | 168 | local confbase="${INSTALL_CONFBASE_RPM}" |
169 | local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM}" | 169 | local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM} ${INSTALL_PACKAGES_MULTILIB_RPM}" |
170 | local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}" | 170 | local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}" |
171 | local package_linguas="${INSTALL_PACKAGES_LINGUAS_RPM}" | 171 | local package_linguas="${INSTALL_PACKAGES_LINGUAS_RPM}" |
172 | local providename="${INSTALL_PROVIDENAME_RPM}" | 172 | local providename="${INSTALL_PROVIDENAME_RPM}" |
@@ -210,10 +210,15 @@ package_install_internal_rpm () { | |||
210 | echo "Processing $pkg..." | 210 | echo "Processing $pkg..." |
211 | 211 | ||
212 | archvar=base_archs | 212 | archvar=base_archs |
213 | ml_pkg=$(echo ${pkg} | sed "s,^${MLPREFIX}\(.*\),\1,") | 213 | ml_prefix=`echo ${pkg} | cut -d'-' -f1` |
214 | if [ "${ml_pkg}" != "${pkg}" ]; then | 214 | ml_pkg=$pkg |
215 | archvar=ml_archs | 215 | for i in ${MULTILIB_PREFIX_LIST} ; do |
216 | fi | 216 | if [ ${ml_prefix} == ${i} ]; then |
217 | ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,") | ||
218 | archvar=ml_archs | ||
219 | break | ||
220 | fi | ||
221 | done | ||
217 | 222 | ||
218 | pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg}) | 223 | pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg}) |
219 | if [ -z "$pkg_name" ]; then | 224 | if [ -z "$pkg_name" ]; then |
@@ -224,16 +229,20 @@ package_install_internal_rpm () { | |||
224 | done | 229 | done |
225 | fi | 230 | fi |
226 | fi | 231 | fi |
227 | |||
228 | if [ ! -z "${package_to_install}" ]; then | 232 | if [ ! -z "${package_to_install}" ]; then |
229 | for pkg in ${package_to_install} ; do | 233 | for pkg in ${package_to_install} ; do |
230 | echo "Processing $pkg..." | 234 | echo "Processing $pkg..." |
231 | 235 | ||
232 | archvar=base_archs | 236 | archvar=base_archs |
233 | ml_pkg=$(echo ${pkg} | sed "s,^${MLPREFIX}\(.*\),\1,") | 237 | ml_prefix=`echo ${pkg} | cut -d'-' -f1` |
234 | if [ "${ml_pkg}" != "${pkg}" ]; then | 238 | ml_pkg=$pkg |
235 | archvar=ml_archs | 239 | for i in ${MULTILIB_PREFIX_LIST} ; do |
236 | fi | 240 | if [ ${ml_prefix} == ${i} ]; then |
241 | ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,") | ||
242 | archvar=ml_archs | ||
243 | break | ||
244 | fi | ||
245 | done | ||
237 | 246 | ||
238 | pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg}) | 247 | pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg}) |
239 | if [ -z "$pkg_name" ]; then | 248 | if [ -z "$pkg_name" ]; then |
@@ -258,10 +267,15 @@ package_install_internal_rpm () { | |||
258 | for pkg in ${package_attemptonly} ; do | 267 | for pkg in ${package_attemptonly} ; do |
259 | echo "Processing $pkg..." | 268 | echo "Processing $pkg..." |
260 | archvar=base_archs | 269 | archvar=base_archs |
261 | ml_pkg=$(echo ${pkg} | sed "s,^${MLPREFIX}\(.*\),\1,") | 270 | ml_prefix=`echo ${pkg} | cut -d'-' -f1` |
262 | if [ "${ml_pkg}" != "${pkg}" ]; then | 271 | ml_pkg=$pkg |
263 | archvar=ml_archs | 272 | for i in ${MULTILIB_PREFIX_LIST} ; do |
264 | fi | 273 | if [ ${ml_prefix} == ${i} ]; then |
274 | ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,") | ||
275 | archvar=ml_archs | ||
276 | break | ||
277 | fi | ||
278 | done | ||
265 | 279 | ||
266 | pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg}) | 280 | pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg}) |
267 | if [ -z "$pkg_name" ]; then | 281 | if [ -z "$pkg_name" ]; then |
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass index 7936d77b96..5ac6bcadfe 100644 --- a/meta/classes/rootfs_rpm.bbclass +++ b/meta/classes/rootfs_rpm.bbclass | |||
@@ -58,6 +58,7 @@ fakeroot rootfs_rpm_do_rootfs () { | |||
58 | export INSTALL_PLATFORM_RPM="${TARGET_ARCH}" | 58 | export INSTALL_PLATFORM_RPM="${TARGET_ARCH}" |
59 | export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}" | 59 | export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}" |
60 | export INSTALL_PACKAGES_NORMAL_RPM="${PACKAGE_INSTALL}" | 60 | export INSTALL_PACKAGES_NORMAL_RPM="${PACKAGE_INSTALL}" |
61 | export INSTALL_PACKAGES_MULTILIB_RPM="${MULTILIB_PACKAGE_INSTALL}" | ||
61 | export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}" | 62 | export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}" |
62 | export INSTALL_PACKAGES_LINGUAS_RPM="${LINGUAS_INSTALL}" | 63 | export INSTALL_PACKAGES_LINGUAS_RPM="${LINGUAS_INSTALL}" |
63 | export INSTALL_PROVIDENAME_RPM="" | 64 | export INSTALL_PROVIDENAME_RPM="" |
@@ -210,6 +211,7 @@ python () { | |||
210 | bb.data.setVar('RPM_POSTPROCESS_COMMANDS', '', d) | 211 | bb.data.setVar('RPM_POSTPROCESS_COMMANDS', '', d) |
211 | 212 | ||
212 | ml_package_archs = "" | 213 | ml_package_archs = "" |
214 | ml_prefix_list = "" | ||
213 | multilibs = d.getVar('MULTILIBS', True) or "" | 215 | multilibs = d.getVar('MULTILIBS', True) or "" |
214 | for ext in multilibs.split(): | 216 | for ext in multilibs.split(): |
215 | eext = ext.split(':') | 217 | eext = ext.split(':') |
@@ -221,6 +223,8 @@ python () { | |||
221 | localdata.setVar("MACHINE_ARCH", eext[1] + "_" + localdata.getVar("MACHINE_ARCH", False)) | 223 | localdata.setVar("MACHINE_ARCH", eext[1] + "_" + localdata.getVar("MACHINE_ARCH", False)) |
222 | package_archs = localdata.getVar("PACKAGE_ARCHS", True) or "" | 224 | package_archs = localdata.getVar("PACKAGE_ARCHS", True) or "" |
223 | ml_package_archs += " " + package_archs | 225 | ml_package_archs += " " + package_archs |
226 | ml_prefix_list += " " + eext[1] | ||
224 | #bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1], localdata.getVar("PACKAGE_ARCHS", True) or "(none)", overrides)) | 227 | #bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1], localdata.getVar("PACKAGE_ARCHS", True) or "(none)", overrides)) |
225 | bb.data.setVar('MULTILIB_PACKAGE_ARCHS', ml_package_archs, d) | 228 | bb.data.setVar('MULTILIB_PACKAGE_ARCHS', ml_package_archs, d) |
229 | bb.data.setVar('MULTILIB_PREFIX_LIST', ml_prefix_list, d) | ||
226 | } | 230 | } |