summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias.schiffer@ew.tq-group.com>2018-11-06 09:56:23 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-24 21:45:58 +0000
commit070ce7bdbfd338a024abf35efda88c944127b832 (patch)
treedae28c66432444bc650290ccb362b94f3b9506ae /meta
parenta2eb50176b800c49c3899fa2f87585a869690bfa (diff)
downloadpoky-070ce7bdbfd338a024abf35efda88c944127b832.tar.gz
base.bbclass: avoid 'find -ignore_readdir_race -delete'
Due to a bug in find [1], -ignore_readdir_race does not work correctly with -delete. This can lead to spurious build failures when files disappear while such a command is running; specifically this was seen in the case of do_configure and do_populate_lic running concurrently for packages with ${B} == ${WORKDIR}: find: '.../sstate-build-populate_lic': No such file or directory While the issue is fixed in the findutils git master, the find command of the host system is called here, so we can't ensure that the used version contains the fix. Many common distros have not updated to a recent enough findutils version yet (Ubuntu 18.10 contains the fix, while 18.04 is still affected). Work around the issue by passing the output of find to 'rm -f' instead of using -delete. [1] https://savannah.gnu.org/bugs/?52981 (From OE-Core rev: 8079e2d62e23f7c274f46185e6dad64fa95394c1) (From OE-Core rev: 0808fe2c1b465114c16265bea3442e878586a8e6) Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/base.bbclass4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index abb4eadf50..2a6a6cb6d7 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -303,7 +303,9 @@ base_do_configure() {
303 if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile -o -e makefile -o -e GNUmakefile \) ]; then 303 if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile -o -e makefile -o -e GNUmakefile \) ]; then
304 oe_runmake clean 304 oe_runmake clean
305 fi 305 fi
306 find ${B} -ignore_readdir_race -name \*.la -delete 306 # -ignore_readdir_race does not work correctly with -delete;
307 # use xargs to avoid spurious build failures
308 find ${B} -ignore_readdir_race -name \*.la -type f -print0 | xargs -0 rm -f
307 fi 309 fi
308 fi 310 fi
309 if [ -n "${CONFIGURESTAMPFILE}" ]; then 311 if [ -n "${CONFIGURESTAMPFILE}" ]; then