summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-09 13:10:07 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-06-11 21:22:46 +0000
commit0632be6b008857a63dbcebadf4f41b5121c4f3d1 (patch)
treefceede90534583d50611b0e2bf1c26a3d25cc455 /meta
parent00fa83951a8bd9d4d61c327f5054321683b313a8 (diff)
downloadtizen-distro-0632be6b008857a63dbcebadf4f41b5121c4f3d1.tar.gz
tizen-distro-0632be6b008857a63dbcebadf4f41b5121c4f3d1.tar.bz2
tizen-distro-0632be6b008857a63dbcebadf4f41b5121c4f3d1.zip
package_rpm.bbclass: Don't pass a 4th parameter to rpm target
rpm --target expects 3 parameters, split by a dash: arch-vendor-os However, glibc may add another parameter, corresponding to the extension used. This is actually common on ARM archs. However, rpm 4.1.4 is not prepared to handle it. When 4 parameters are found, it will use the last one as the OS, causing the image build to fail. Fix this by always discarding the 4th parameter, if present. This patch is a co-work with Thiago Santos <thiagoss@osg.samsung.com>, with actually come with the final solution. Change-Id: I8ab3473ef4e6ff1501a1f82db0ab2bb8d7d9df50 Signed-off-by: Thiago Santos <thiagoss@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package_rpm.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 6483e961f7..e1e2c1cf20 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -690,6 +690,9 @@ python do_package_rpm () {
d.setVar('PACKAGE_ARCH_EXTEND', package_arch)
pkgwritedir = d.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}')
pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
+ tokens = pkgarch.split('-')
+ if len(tokens) > 3:
+ pkgarch = '-'.join(tokens[:3])
magicfile = d.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc')
bb.utils.mkdirhier(pkgwritedir)
os.chmod(pkgwritedir, 0755)