]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_rpm.bbclass: Fix the way the RPM platform file is generated
authorMark Hatle <mark.hatle@windriver.com>
Tue, 11 Dec 2012 17:57:21 +0000 (11:57 -0600)
committerSaul Wold <sgw@linux.intel.com>
Fri, 14 Dec 2012 23:17:18 +0000 (15:17 -0800)
When generating an SDK, we need to use either the SDK or TARGET version
of the OS.  They are not interchangable!

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/package_rpm.bbclass

index 4f60daffb406f9f52058472995ed2af54e4fcdc0..fdca2c320d8b68cffb9f041add58c24bda2949f0 100644 (file)
@@ -262,16 +262,26 @@ package_install_internal_rpm () {
        if [ "${INSTALL_COMPLEMENTARY_RPM}" != "1" ] ; then
                # Setup base system configuration
                mkdir -p ${target_rootfs}/etc/rpm/
-               echo "${platform}${TARGET_VENDOR}-${TARGET_OS}" > ${target_rootfs}/etc/rpm/platform
+               if [ -n "${sdk_mode}" ]; then
+                       platform_vendor="${SDK_VENDOR}"
+                       platform_os="${SDK_OS}"
+               else
+                       platform_vendor="${TARGET_VENDOR}"
+                       platform_os="${TARGET_OS}"
+               fi
+
+               echo "${platform}${platform_vendor}-${platform_os}" > ${target_rootfs}/etc/rpm/platform
+
+
                if [ ! -z "$platform_extra" ]; then
                        for pt in $platform_extra ; do
                                channel_priority=$(expr $channel_priority + 5)
                                case $pt in
                                        noarch | any | all)
-                                               os="`echo ${TARGET_OS} | sed "s,-.*,,"`.*"
+                                               os="`echo ${platform_os} | sed "s,-.*,,"`.*"
                                                ;;
                                        *)
-                                               os="${TARGET_OS}"
+                                               os="${platform_os}"
                                                ;;
                                esac
                                echo "$pt-.*-$os" >> ${target_rootfs}/etc/rpm/platform