From 0632be6b008857a63dbcebadf4f41b5121c4f3d1 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 9 Apr 2015 13:10:07 -0300 Subject: [PATCH] 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 , with actually come with the final solution. Change-Id: I8ab3473ef4e6ff1501a1f82db0ab2bb8d7d9df50 Signed-off-by: Thiago Santos Signed-off-by: Mauro Carvalho Chehab --- meta/classes/package_rpm.bbclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 6483e96..e1e2c1c 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) -- 2.7.4