Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] bitbake.conf: Remove replace call from MACHINE_ARCH
@ 2015-07-29 10:49 Ioan-Adrian Ratiu
  2015-07-30 13:13 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Ioan-Adrian Ratiu @ 2015-07-29 10:49 UTC (permalink / raw)
  To: openembedded-core

This replace() hack was added to fix Yocto bug #946 [1] with commit id
69b3a11. It is time to fix this properly. It should not be an issue
anymore with libzypp after 4.5 years, but if the initial bug still
exists, then a more intelligent solution should be used to fix it.

If a package build fails because it expects _ instead of - inside
MACHINE_ARCH, then the problem is with the package build, not with the
global variable used by all machines.

*IF* the offending package build cannot be easily fixed, then there
are better workarounds than globally replacing. For example overwriting
MACHINE_ARCH in the <machine-name>.conf which is causing the offending
package to fail (thus not screwing all), or using conditional overrides
MACHINE_ARCH_qemux86-64 = "qemux86_64"

Mangling the variable globally for all machines causes other components
that expect the sane MACHINE_ARCH value to fail.

[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=946

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 730ab80..19e7ddf 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -136,7 +136,7 @@ SDK_AS_ARCH = "${BUILD_AS_ARCH}"
 
 TUNE_PKGARCH ??= ""
 PACKAGE_ARCH ??= "${TUNE_PKGARCH}"
-MACHINE_ARCH = "${@[d.getVar('TUNE_PKGARCH', True), d.getVar('MACHINE', True)][bool(d.getVar('MACHINE', True))].replace('-', '_')}"
+MACHINE_ARCH = "${@[d.getVar('TUNE_PKGARCH', True), d.getVar('MACHINE', True)][bool(d.getVar('MACHINE', True))]}"
 PACKAGE_EXTRA_ARCHS ??= "${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}"
 PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
 # MACHINE_ARCH shouldn't be included here as a variable dependency
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-30 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-29 10:49 [PATCH] bitbake.conf: Remove replace call from MACHINE_ARCH Ioan-Adrian Ratiu
2015-07-30 13:13 ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox