Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] autotools.bbclass: Fix m4 file race
@ 2011-08-03 15:14 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2011-08-03 15:14 UTC (permalink / raw)
  To: openembedded-core

If something removes .m4 files from the aclocal directory whilst aclocal is
running it gets upset. To avoid this we need to take a copy of the aclocal
directory and build against this instead.

[YOCTO #861]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index e5c13ae..8f65b70 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -111,8 +111,13 @@ autotools_do_configure() {
 			if [ -d ${STAGING_DATADIR_NATIVE}/aclocal-$AUTOV ]; then
 				acpaths="$acpaths -I${STAGING_DATADIR_NATIVE}/aclocal-$AUTOV"
 			fi
+			# The aclocal directory could get modified by other processes 
+			# uninstalling data from the sysroot. See Yocto #861 for details.
+			# We avoid this by taking a copy here and then files cannot disappear.
 			if [ -d ${STAGING_DATADIR}/aclocal ]; then
-				acpaths="$acpaths -I ${STAGING_DATADIR}/aclocal"
+				mkdir -p ${B}/aclocal-copy/
+				cp ${STAGING_DATADIR}/aclocal/* ${B}/aclocal-copy/
+				acpaths="$acpaths -I ${B}/aclocal-copy/"
 			fi
 			# autoreconf is too shy to overwrite aclocal.m4 if it doesn't look
 			# like it was auto-generated.  Work around this by blowing it away





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

only message in thread, other threads:[~2011-08-03 15:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-03 15:14 [PATCH] autotools.bbclass: Fix m4 file race Richard Purdie

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