summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2018-09-04 14:58:43 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-05 18:00:25 +0100
commit444b3139cdc92692045625c2bda1ceea4f1c328c (patch)
treeedd3b8862974db85970833e5bf0a1c93861052a1 /meta
parent7ef551b88b0efecf36df0da8dab9d33e89fb9524 (diff)
downloadpoky-444b3139cdc92692045625c2bda1ceea4f1c328c.tar.gz
package_manager.py: add noarch to buildarch_compat
It fails to run rpmbuild to build a noarch package on target when it contains 'BuildArch: noarch' in the spec file: | error: No compatible architectures found for build Add 'noarch' to buildarch_compat in configure file rpmrc to fix it. (From OE-Core rev: 2bdddb458bcc779d595e972f60a719aeb1c1b6d5) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/package_manager.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index a17de5de73..7ae5e045df 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -766,7 +766,9 @@ class RpmPM(PackageManager):
766 rpmrcconfdir = "%s/%s" %(self.target_rootfs, "etc/") 766 rpmrcconfdir = "%s/%s" %(self.target_rootfs, "etc/")
767 bb.utils.mkdirhier(platformconfdir) 767 bb.utils.mkdirhier(platformconfdir)
768 open(platformconfdir + "platform", 'w').write("%s-pc-linux" % self.primary_arch) 768 open(platformconfdir + "platform", 'w').write("%s-pc-linux" % self.primary_arch)
769 open(rpmrcconfdir + "rpmrc", 'w').write("arch_compat: %s: %s\n" % (self.primary_arch, self.archs if len(self.archs) > 0 else self.primary_arch)) 769 with open(rpmrcconfdir + "rpmrc", 'w') as f:
770 f.write("arch_compat: %s: %s\n" % (self.primary_arch, self.archs if len(self.archs) > 0 else self.primary_arch))
771 f.write("buildarch_compat: %s: noarch\n" % self.primary_arch)
770 772
771 open(platformconfdir + "macros", 'w').write("%_transaction_color 7\n") 773 open(platformconfdir + "macros", 'w').write("%_transaction_color 7\n")
772 if self.d.getVar('RPM_PREFER_ELF_ARCH'): 774 if self.d.getVar('RPM_PREFER_ELF_ARCH'):