* [PATCH 0/1] package_manager.py: add noarch to buildarch_compat
@ 2018-09-04 6:58 kai.kang
2018-09-04 6:58 ` [PATCH 1/1] " kai.kang
0 siblings, 1 reply; 2+ messages in thread
From: kai.kang @ 2018-09-04 6:58 UTC (permalink / raw)
To: alex.kanavin; +Cc: openembedded-core
From: Kai Kang <kai.kang@windriver.com>
The following changes since commit 4434777705cf49300a7d2c9ca8fa3080d551d795:
bitbake: tests/fetch: Update gnome.org urls after upstream changes (2018-08-29 10:43:23 +0100)
are available in the Git repository at:
git://git.pokylinux.org/poky-contrib kangkai/rpm
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/rpm
Kai Kang (1):
package_manager.py: add noarch to buildarch_compat
meta/lib/oe/package_manager.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--
2.18.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] package_manager.py: add noarch to buildarch_compat
2018-09-04 6:58 [PATCH 0/1] package_manager.py: add noarch to buildarch_compat kai.kang
@ 2018-09-04 6:58 ` kai.kang
0 siblings, 0 replies; 2+ messages in thread
From: kai.kang @ 2018-09-04 6:58 UTC (permalink / raw)
To: alex.kanavin; +Cc: openembedded-core
From: Kai Kang <kai.kang@windriver.com>
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.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
meta/lib/oe/package_manager.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 398838835e..da53e06c33 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -766,7 +766,9 @@ class RpmPM(PackageManager):
rpmrcconfdir = "%s/%s" %(self.target_rootfs, "etc/")
bb.utils.mkdirhier(platformconfdir)
open(platformconfdir + "platform", 'w').write("%s-pc-linux" % self.primary_arch)
- open(rpmrcconfdir + "rpmrc", 'w').write("arch_compat: %s: %s\n" % (self.primary_arch, self.archs if len(self.archs) > 0 else self.primary_arch))
+ with open(rpmrcconfdir + "rpmrc", 'w') as f:
+ f.write("arch_compat: %s: %s\n" % (self.primary_arch, self.archs if len(self.archs) > 0 else self.primary_arch))
+ f.write("buildarch_compat: %s: noarch\n" % self.primary_arch)
open(platformconfdir + "macros", 'w').write("%_transaction_color 7\n")
if self.d.getVar('RPM_PREFER_ELF_ARCH'):
--
2.18.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-04 7:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-04 6:58 [PATCH 0/1] package_manager.py: add noarch to buildarch_compat kai.kang
2018-09-04 6:58 ` [PATCH 1/1] " kai.kang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox