summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2014-07-02 19:57:46 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-08 11:20:12 +0100
commit7bf5341007c188463baa7c331fcd945aedf67b1d (patch)
tree93e25fef5afbb5d8a35b3821c09e89e6d51c7bcf /meta/classes/package_rpm.bbclass
parentf17179990221b5e022daee9302d2c0d586e5de2e (diff)
downloadpoky-7bf5341007c188463baa7c331fcd945aedf67b1d.tar.gz
package_rpm.bbclass: Should be using HOST_* not TARGET_*
When building target packages, HOST_OS and TARGET_OS are the same, as is the VENDOR field. However, when building an SDK this is not true. The patch corrects the oversight and switches to using the 'HOST' version and resolves the issue of meta-mingw not working w/ the rpm packaging. (From OE-Core rev: 0fa1eb5c1296a38b332b63d539608da7ef56c3c0) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 71cfdc1da4..0a32b3e5dc 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -652,7 +652,7 @@ python do_package_rpm () {
652 # Setup the rpmbuild arguments... 652 # Setup the rpmbuild arguments...
653 rpmbuild = d.getVar('RPMBUILD', True) 653 rpmbuild = d.getVar('RPMBUILD', True)
654 targetsys = d.getVar('TARGET_SYS', True) 654 targetsys = d.getVar('TARGET_SYS', True)
655 targetvendor = d.getVar('TARGET_VENDOR', True) 655 targetvendor = d.getVar('HOST_VENDOR', True)
656 package_arch = (d.getVar('PACKAGE_ARCH', True) or "").replace("-", "_") 656 package_arch = (d.getVar('PACKAGE_ARCH', True) or "").replace("-", "_")
657 sdkpkgsuffix = (d.getVar('SDKPKGSUFFIX', True) or "nativesdk").replace("-", "_") 657 sdkpkgsuffix = (d.getVar('SDKPKGSUFFIX', True) or "nativesdk").replace("-", "_")
658 if package_arch not in "all any noarch".split() and not package_arch.endswith(sdkpkgsuffix): 658 if package_arch not in "all any noarch".split() and not package_arch.endswith(sdkpkgsuffix):
@@ -661,7 +661,7 @@ python do_package_rpm () {
661 else: 661 else:
662 d.setVar('PACKAGE_ARCH_EXTEND', package_arch) 662 d.setVar('PACKAGE_ARCH_EXTEND', package_arch)
663 pkgwritedir = d.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}') 663 pkgwritedir = d.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}')
664 pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${TARGET_VENDOR}-${TARGET_OS}') 664 pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
665 magicfile = d.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc') 665 magicfile = d.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc')
666 bb.utils.mkdirhier(pkgwritedir) 666 bb.utils.mkdirhier(pkgwritedir)
667 os.chmod(pkgwritedir, 0755) 667 os.chmod(pkgwritedir, 0755)