[oe-commits] [openembedded-core] 14/18: base.bbclass: avoid 'find -ignore_readdir_race -delete'

git at git.openembedded.org git at git.openembedded.org
Sat Nov 24 21:48:04 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch sumo
in repository openembedded-core.

commit 0808fe2c1b465114c16265bea3442e878586a8e6
Author: Matthias Schiffer <matthias.schiffer at ew.tq-group.com>
AuthorDate: Tue Nov 6 09:56:23 2018 +0100

    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)
    
    Signed-off-by: Matthias Schiffer <matthias.schiffer at ew.tq-group.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/classes/base.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index abb4ead..2a6a6cb 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -303,7 +303,9 @@ base_do_configure() {
 			if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile -o -e makefile -o -e GNUmakefile \) ]; then
 				oe_runmake clean
 			fi
-			find ${B} -ignore_readdir_race -name \*.la -delete
+			# -ignore_readdir_race does not work correctly with -delete;
+			# use xargs to avoid spurious build failures
+			find ${B} -ignore_readdir_race -name \*.la -type f -print0 | xargs -0 rm -f
 		fi
 	fi
 	if [ -n "${CONFIGURESTAMPFILE}" ]; then

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list