summaryrefslogtreecommitdiff
path: root/meta/classes/populate_sdk_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/populate_sdk_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/populate_sdk_rpm.bbclass')
-rw-r--r--meta/classes/populate_sdk_rpm.bbclass42
1 files changed, 30 insertions, 12 deletions
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass
index 0595aa7fca..2dfb80c592 100644
--- a/meta/classes/populate_sdk_rpm.bbclass
+++ b/meta/classes/populate_sdk_rpm.bbclass
@@ -39,7 +39,7 @@ populate_sdk_rpm () {
# This needs to work in the same way as rootfs_rpm.bbclass!
#
export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}/${SDKTARGETSYSROOT}"
- export INSTALL_PLATFORM_RPM="${TARGET_ARCH}"
+ export INSTALL_PLATFORM_RPM="$(echo ${TARGET_ARCH} | tr - _)${TARGET_VENDOR}-${TARGET_OS}"
export INSTALL_PACKAGES_RPM="${TOOLCHAIN_TARGET_TASK}"
export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${TOOLCHAIN_TARGET_TASK_ATTEMPTONLY}"
export INSTALL_PACKAGES_LINGUAS_RPM=""
@@ -57,20 +57,31 @@ populate_sdk_rpm () {
# 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
@@ -85,7 +96,7 @@ populate_sdk_rpm () {
## install nativesdk ##
echo "Installing NATIVESDK packages"
export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}"
- export INSTALL_PLATFORM_RPM="${SDK_ARCH}"
+ export INSTALL_PLATFORM_RPM="$(echo ${TARGET_ARCH} | tr - _)${SDK_VENDOR}-${SDK_OS}"
export INSTALL_PACKAGES_RPM="${TOOLCHAIN_HOST_TASK}"
export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${TOOLCHAIN_TARGET_HOST_ATTEMPTONLY}"
export INSTALL_PACKAGES_LINGUAS_RPM=""
@@ -96,7 +107,8 @@ populate_sdk_rpm () {
# List must be prefered to least preferred order
INSTALL_PLATFORM_EXTRA_RPM=""
for each_arch in ${SDK_PACKAGE_ARCHS} ; do
- INSTALL_PLATFORM_EXTRA_RPM="$each_arch $INSTALL_PLATFORM_EXTRA_RPM"
+ platform="$(echo $each_arch | tr - _)-.*-${SDK_OS}"
+ INSTALL_PLATFORM_EXTRA_RPM="$platform $INSTALL_PLATFORM_EXTRA_RPM"
done
export INSTALL_PLATFORM_EXTRA_RPM
@@ -121,7 +133,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(':')
@@ -130,9 +144,13 @@ 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)
}