summaryrefslogtreecommitdiff
path: root/meta/classes/rootfs_rpm.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2013-02-21 17:18:29 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-22 06:32:44 -0800
commitaa760ff7dee4029c30c9de9fc0b640149e4a4c77 (patch)
treee05ab94fa4cb09065fa1dccbb5b71f8a5f3506f1 /meta/classes/rootfs_rpm.bbclass
parent57134958a2c6b74de8654600e33acdd265966638 (diff)
downloadopenembedded-core-aa760ff7dee4029c30c9de9fc0b640149e4a4c77.tar.gz
openembedded-core-aa760ff7dee4029c30c9de9fc0b640149e4a4c77.tar.bz2
openembedded-core-aa760ff7dee4029c30c9de9fc0b640149e4a4c77.zip
rootfs_rpm.bbclass: Handle multilib configures with different OS values
[ CQID: WIND00404082 ] It is possible for the TARGET_OS to change dependending on the multilib used for a given package build. mips64 has two potential TARGET_OS values: linux and linux-gnun32. The RPM and Smart setup needs to distinguish between the two otherwise packages of the "non-default" TARGET_OS may be ignored as incompatible. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs_rpm.bbclass')
-rw-r--r--meta/classes/rootfs_rpm.bbclass37
1 files changed, 27 insertions, 10 deletions
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 920380e559..9dc2bf997c 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -50,7 +50,7 @@ fakeroot rootfs_rpm_do_rootfs () {
# install packages
# This needs to work in the same way as populate_sdk_rpm.bbclass!
export INSTALL_ROOTFS_RPM="${IMAGE_ROOTFS}"
- export INSTALL_PLATFORM_RPM="${TARGET_ARCH}"
+ export INSTALL_PLATFORM_RPM="$(echo ${TARGET_ARCH} | tr - _)${TARGET_VENDOR}-${TARGET_OS}"
export INSTALL_PACKAGES_RPM="${PACKAGE_INSTALL}"
export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}"
export INSTALL_PACKAGES_LINGUAS_RPM="${LINGUAS_INSTALL}"
@@ -64,20 +64,31 @@ fakeroot rootfs_rpm_do_rootfs () {
# List must be prefered to least preferred order
default_extra_rpm=""
INSTALL_PLATFORM_EXTRA_RPM=""
- for i in ${MULTILIB_PREFIX_LIST} ; do
+ for os in ${MULTILIB_OS_LIST} ; do
old_IFS="$IFS"
IFS=":"
- set $i
+ set -- $os
IFS="$old_IFS"
mlib=$1
- shift #remove mlib
- while [ -n "$1" ]; do
- if [ "$mlib" = "${BBEXTENDVARIANT}" ]; then
- default_extra_rpm="$default_extra_rpm $1"
- else
- INSTALL_PLATFORM_EXTRA_RPM="$INSTALL_PLATFORM_EXTRA_RPM $1"
+ mlib_os=$2
+ for prefix in ${MULTILIB_PREFIX_LIST} ; do
+ old_IFS="$IFS"
+ IFS=":"
+ set -- $prefix
+ IFS="$old_IFS"
+ if [ "$mlib" != "$1" ]; then
+ continue
fi
- shift
+ shift #remove mlib
+ while [ -n "$1" ]; do
+ platform="$(echo $1 | tr - _)-.*-$mlib_os"
+ if [ "$mlib" = "${BBEXTENDVARIANT}" ]; then
+ default_extra_rpm="$default_extra_rpm $platform"
+ else
+ INSTALL_PLATFORM_EXTRA_RPM="$INSTALL_PLATFORM_EXTRA_RPM $platform"
+ fi
+ shift
+ done
done
done
if [ -n "$default_extra_rpm" ]; then
@@ -210,7 +221,9 @@ python () {
# package_arch order is reversed. This ensures the -best- match is listed first!
package_archs = d.getVar("PACKAGE_ARCHS", True) or ""
package_archs = ":".join(package_archs.split()[::-1])
+ package_os = d.getVar("TARGET_OS", True) or ""
ml_prefix_list = "%s:%s" % ('default', package_archs)
+ ml_os_list = "%s:%s" % ('default', package_os)
multilibs = d.getVar('MULTILIBS', True) or ""
for ext in multilibs.split():
eext = ext.split(':')
@@ -219,8 +232,12 @@ python () {
default_tune = localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + eext[1], False)
if default_tune:
localdata.setVar("DEFAULTTUNE", default_tune)
+ bb.data.update_data(localdata)
package_archs = localdata.getVar("PACKAGE_ARCHS", True) or ""
package_archs = ":".join([i in "all noarch any".split() and i or eext[1]+"_"+i for i in package_archs.split()][::-1])
+ package_os = localdata.getVar("TARGET_OS", True) or ""
ml_prefix_list += " %s:%s" % (eext[1], package_archs)
+ ml_os_list += " %s:%s" % (eext[1], package_os)
d.setVar('MULTILIB_PREFIX_LIST', ml_prefix_list)
+ d.setVar('MULTILIB_OS_LIST', ml_os_list)
}