package_rpm.bbclass: change the arch's "-" to "_" for platform
authorRobert Yang <liezhi.yang@windriver.com>
Tue, 25 Sep 2012 13:38:36 +0000 (21:38 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Sep 2012 14:02:29 +0000 (15:02 +0100)
The platform and platform_extra will be written to /etc/rpm/platform,
the rpm's arch has changed the "-" to "_", so the value in platform
should also be updated.

[YOCTO #3159]

(From OE-Core rev: 9880a5261ca509c69efbafa27cddd9b2b8ca08f0)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_rpm.bbclass

index ce34016..49055f2 100644 (file)
@@ -276,8 +276,8 @@ process_pkg_list_rpm() {
 package_install_internal_rpm () {
 
        local target_rootfs="${INSTALL_ROOTFS_RPM}"
-       local platform="${INSTALL_PLATFORM_RPM}"
-       local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}"
+       local platform="`echo ${INSTALL_PLATFORM_RPM} | sed 's#-#_#g'`"
+       local platform_extra="`echo ${INSTALL_PLATFORM_EXTRA_RPM} | sed 's#-#_#g'`"
        local confbase="${INSTALL_CONFBASE_RPM}"
        local package_to_install="${INSTALL_PACKAGES_RPM}"
        local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}"