diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-29 13:28:48 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 12:04:49 +0100 |
commit | a92ff3ad4212f8966bbd3f6defcb112737d81cda (patch) | |
tree | f5f1ed6346b5a018cef3cf7db8002c4649f7af5d /meta/classes/autotools.bbclass | |
parent | b3e9a990762da5b434528e75fbd54ca70ff5ba8f (diff) | |
download | poky-a92ff3ad4212f8966bbd3f6defcb112737d81cda.tar.gz |
scripts/cp-noerror: Add a special copy function to fix autotools issues
Currently we copy the aclocal directory to the build so that autotools
doesn't see .m4 files disappear when its processing them. This can happen
if for example, package X is being rebuilt at the same time as Y and it
gets uninstalled from sstate (assuming there are no dependencies between
X and Y). This code making the copy was added to avoid races but introduces
a race of its own, namely that the files can disappear during the copy.
This patch adds a cp-noerror script which silently ignores such errors
and gives the behaviour we need in this case. It hence fixes issues which
crop up for users and the autobuilder occasionally.
[YOCTO #2485]
(From OE-Core rev: 0f81fbc0df73675aeb79c724858799a3b6a02f85)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/autotools.bbclass')
-rw-r--r-- | meta/classes/autotools.bbclass | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index 941c06d032..9b36f3c7b6 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass | |||
@@ -124,10 +124,9 @@ autotools_do_configure() { | |||
124 | # uninstalling data from the sysroot. See Yocto #861 for details. | 124 | # uninstalling data from the sysroot. See Yocto #861 for details. |
125 | # We avoid this by taking a copy here and then files cannot disappear. | 125 | # We avoid this by taking a copy here and then files cannot disappear. |
126 | if [ -d ${STAGING_DATADIR}/aclocal ]; then | 126 | if [ -d ${STAGING_DATADIR}/aclocal ]; then |
127 | mkdir -p ${B}/aclocal-copy/ | ||
128 | # for scratch build this directory can be empty | 127 | # for scratch build this directory can be empty |
129 | # so avoid cp's no files to copy error | 128 | # so avoid cp's no files to copy error |
130 | cp -r ${STAGING_DATADIR}/aclocal/. ${B}/aclocal-copy/ | 129 | cp-noerror ${STAGING_DATADIR}/aclocal ${B}/aclocal-copy/ |
131 | acpaths="$acpaths -I ${B}/aclocal-copy/" | 130 | acpaths="$acpaths -I ${B}/aclocal-copy/" |
132 | fi | 131 | fi |
133 | # autoreconf is too shy to overwrite aclocal.m4 if it doesn't look | 132 | # autoreconf is too shy to overwrite aclocal.m4 if it doesn't look |