summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-12-11 11:57:21 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-17 17:24:51 +0000
commit06afdb89288673f5a3f4179f8af3b4b1fb1a9b8b (patch)
treedc03f19c882f777e96644e8c9bc1c39e9a13961b /meta/classes
parenta6aa74817cce38799b447cd47ef6f77aee9fcc85 (diff)
downloadpoky-06afdb89288673f5a3f4179f8af3b4b1fb1a9b8b.tar.gz
package_rpm.bbclass: Fix the way the RPM platform file is generated
When generating an SDK, we need to use either the SDK or TARGET version of the OS. They are not interchangable! (From OE-Core rev: 8f6e33231439c9c2c1584b2790f62f833439e3c1) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package_rpm.bbclass16
1 files changed, 13 insertions, 3 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 4f60daffb4..fdca2c320d 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -262,16 +262,26 @@ package_install_internal_rpm () {
262 if [ "${INSTALL_COMPLEMENTARY_RPM}" != "1" ] ; then 262 if [ "${INSTALL_COMPLEMENTARY_RPM}" != "1" ] ; then
263 # Setup base system configuration 263 # Setup base system configuration
264 mkdir -p ${target_rootfs}/etc/rpm/ 264 mkdir -p ${target_rootfs}/etc/rpm/
265 echo "${platform}${TARGET_VENDOR}-${TARGET_OS}" > ${target_rootfs}/etc/rpm/platform 265 if [ -n "${sdk_mode}" ]; then
266 platform_vendor="${SDK_VENDOR}"
267 platform_os="${SDK_OS}"
268 else
269 platform_vendor="${TARGET_VENDOR}"
270 platform_os="${TARGET_OS}"
271 fi
272
273 echo "${platform}${platform_vendor}-${platform_os}" > ${target_rootfs}/etc/rpm/platform
274
275
266 if [ ! -z "$platform_extra" ]; then 276 if [ ! -z "$platform_extra" ]; then
267 for pt in $platform_extra ; do 277 for pt in $platform_extra ; do
268 channel_priority=$(expr $channel_priority + 5) 278 channel_priority=$(expr $channel_priority + 5)
269 case $pt in 279 case $pt in
270 noarch | any | all) 280 noarch | any | all)
271 os="`echo ${TARGET_OS} | sed "s,-.*,,"`.*" 281 os="`echo ${platform_os} | sed "s,-.*,,"`.*"
272 ;; 282 ;;
273 *) 283 *)
274 os="${TARGET_OS}" 284 os="${platform_os}"
275 ;; 285 ;;
276 esac 286 esac
277 echo "$pt-.*-$os" >> ${target_rootfs}/etc/rpm/platform 287 echo "$pt-.*-$os" >> ${target_rootfs}/etc/rpm/platform