summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-03 16:06:43 +0100
committerSaul Wold <sgw@linux.intel.com>2011-08-03 18:47:53 -0700
commit9af5107141f8d408ccda56a94d6d469a0d7fcaea (patch)
tree50900c21e6e2679df009bb389b143ef696663862
parent04d30a921e4b71b37f0171a5ba1147bedb45f412 (diff)
downloadpoky-9af5107141f8d408ccda56a94d6d469a0d7fcaea.tar.gz
poky-9af5107141f8d408ccda56a94d6d469a0d7fcaea.tar.bz2
poky-9af5107141f8d408ccda56a94d6d469a0d7fcaea.zip
autotools.bbclass: Fix m4 file race
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] (From OE-Core rev: 6a4778e21341f031569f561e7699d2c616b60af0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/autotools.bbclass7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index e5c13ae691..8f65b709fd 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