public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] binutils: the cat should always succeed when building config.cache
@ 2013-05-23 17:33 Saul Wold
  0 siblings, 0 replies; only message in thread
From: Saul Wold @ 2013-05-23 17:33 UTC (permalink / raw)
  To: openembedded-core

There is a race condition between when the CONFIG_SITE list is generated and
then used here via the cat to create the config.cache and in *all* configure
scripts when reading from CONFIG_SITE.

The race in this case is that the sstate setscene task runs on a package that
contains a site config file (ncurses in this case) and then bitbake decides
that it needs to rebuild and cleans out the site config file, so it existed
for siteinfo_get_files() to find in SITECONFIG_SYSROOTCACHE and then was removed
for the rebuild. When bintuils tried to run the do_configure() task which creates
the binutil's version of config.cache it reads from CONFIG_SITE which now contains
the non-existant site config file. (confused yet ;-)?

Currently the configure script does a test -r to ensure the file is readable
before using it, therefore having the cat succeed regardless of the file being
available is consistent behaviour.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-devtools/binutils/binutils.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index 1e59296..5e78dc0 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -90,7 +90,7 @@ do_configure () {
 #
 	mkdir -p ${B}/build-${BUILD_SYS}
 	for i in ${CONFIG_SITE}; do
-		cat $i >> ${B}/build-${BUILD_SYS}/config.cache
+		cat $i >> ${B}/build-${BUILD_SYS}/config.cache || true
 	done
 }
 
-- 
1.8.1.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-23 17:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-23 17:33 [PATCH] binutils: the cat should always succeed when building config.cache Saul Wold

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