All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: "matthias.schiffer@ew.tq-group.com" <matthias.schiffer@ew.tq-group.com>
Cc: "openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] base.bbclass: avoid 'find -ignore_readdir_race	-delete'
Date: Fri, 2 Nov 2018 15:19:44 +0000	[thread overview]
Message-ID: <8ba204af82c54d23805deefb5197dd6f@XBOX04.axis.com> (raw)
In-Reply-To: <20181102143927.15387-1-matthias.schiffer@ew.tq-group.com>

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org <openembedded-
> core-bounces@lists.openembedded.org> On Behalf Of
> matthias.schiffer@ew.tq-group.com
> Sent: den 2 november 2018 15:39
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH] base.bbclass: avoid 'find -
> ignore_readdir_race -delete'
> 
> From: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> 
> Until recent versions of findutils, -ignore_readdir_race did not work
> correctly with -delete. This led to spurious build failures when files
> disappeared; specifically this was seen due to do_configure and
> do_populate_lic running concurrently for packages with ${B} == ${WORKDIR}:
> 
>    find: '.../sstate-build-populate_lic': No such file or directory
> 
> As the find command of the host system is used here, we can't ensure that
> the used version contains the fix. Work around the issue by passing the
> output of find to 'rm -f' instead of using -delete.
> 
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> ---
> 
> It would be great if this patch could be backported to all versions
> back to Rocko, as our current setup is still based on Rocko.
> 
>  meta/classes/base.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index df11c8b270..5ffd8396e3 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -303,7 +303,7 @@ base_do_configure() {
>  			if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile -o -e makefile -o -e GNUmakefile \) ]; then
>  				oe_runmake clean
>  			fi

You might want to include a comment here explaining why rm -f is used 
instead of -delete, or someone might come along and optimize the code...

> -			find ${B} -ignore_readdir_race -name \*.la -delete
> +			find ${B} -ignore_readdir_race -name \*.la -type f -print0 | xargs -0 rm -f
>  		fi
>  	fi
>  	if [ -n "${CONFIGURESTAMPFILE}" ]; then
> --
> 2.17.1

//Peter



  reply	other threads:[~2018-11-02 15:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02 14:39 [PATCH] base.bbclass: avoid 'find -ignore_readdir_race -delete' matthias.schiffer
2018-11-02 15:19 ` Peter Kjellerstedt [this message]
2018-11-02 15:43   ` Richard Purdie
2018-11-03  3:28     ` Andre McCurdy
2018-11-05  8:36       ` Matthias Schiffer
2018-11-06  8:23         ` Matthias Schiffer
2018-11-06  8:25           ` Andre McCurdy
2018-11-06  8:38             ` Matthias Schiffer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ba204af82c54d23805deefb5197dd6f@XBOX04.axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=matthias.schiffer@ew.tq-group.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.