From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.tq-group.com (mx1.tq-group.com [62.157.118.193]) by mail.openembedded.org (Postfix) with ESMTP id 6A1E079DAD for ; Tue, 6 Nov 2018 08:23:41 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.54,471,1534802400"; d="scan'208";a="5000998" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 06 Nov 2018 09:23:42 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Tue, 06 Nov 2018 09:23:42 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Tue, 06 Nov 2018 09:23:42 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1541492622; x=1573028622; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=KUzSB+GuJ+SU9tpz09yoRAXoCexP9kh+OylJmKdqZCY=; b=Ln1KXKQMCWpoRXO/nNKvU34dRFOBwaspEw7Eo7yvew4psQ/cWWZqxAIh R9ClciC1KJaAkUyQOS4dTuYPdA05ZH+lbt5t5Q5hc6W6IQ2Bo+/E0BOSZ KWheuSvoTVSqVvUGUBheaUngJZcsMhS9P1BhDnkCIF7Nx/T4UTP8Jv7lx RiO5e2soTVIFuNCKxXuYXHuwy9wo6tFE1lAO8rm/v79MtnJB3kzApXQmp oeGyGEN4hsQYWEWR1mH2QsxgrloCZHKRvbpBI5SNYyMMyU47dS+lOXGU8 +3QzU5WMBvbPktLZaVbFKxWm6vsXRaD+4Vbp7ZspGnR0rJLH+ejxU2oGQ g==; X-IronPort-AV: E=Sophos;i="5.54,471,1534802400"; d="scan'208";a="5000997" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 06 Nov 2018 09:23:42 +0100 Received: from schifferm-ubuntu4.tq-net.de (schifferm-ubuntu4.tq-net.de [10.117.49.26]) by vtuxmail01.tq-net.de (Postfix) with ESMTPA id 4B990280065; Tue, 6 Nov 2018 09:23:55 +0100 (CET) Message-ID: From: Matthias Schiffer To: Andre McCurdy , Richard Purdie Date: Tue, 06 Nov 2018 09:23:39 +0100 In-Reply-To: <71b9588f36d8a6932687bace51faab7b64e13a7c.camel@ew.tq-group.com> References: <20181102143927.15387-1-matthias.schiffer@ew.tq-group.com> <8ba204af82c54d23805deefb5197dd6f@XBOX04.axis.com> <8897ab754bea0fda7195a851b2d19695dd7553e9.camel@linuxfoundation.org> <71b9588f36d8a6932687bace51faab7b64e13a7c.camel@ew.tq-group.com> X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Cc: Peter Kjellerstedt , OE Core mailing list Subject: Re: [PATCH] base.bbclass: avoid 'find -ignore_readdir_race -delete' X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2018 08:23:43 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Mon, 2018-11-05 at 09:36 +0100, Matthias Schiffer wrote: > On Fri, 2018-11-02 at 20:28 -0700, Andre McCurdy wrote: > > On Fri, Nov 2, 2018 at 8:43 AM Richard Purdie > > wrote: > > > > > > On Fri, 2018-11-02 at 15:19 +0000, Peter Kjellerstedt wrote: > > > > > -----Original Message----- > > > > > From: openembedded-core-bounces@lists.openembedded.org > > > > > > > > > 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 > > > > > > > > > > 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... > > > > > > We should detail which versions of findutils have the issue as > > > ultimately it would be nice to use the simpler command. I'm > > > curious > > > how > > > many of the distros we support have the problem. > > > > There's a test case in the patch proposed to fix the issue: > > > > https://savannah.gnu.org/bugs/?52981 > > https://savannah.gnu.org/bugs/download.php?file_id=43119 > > > > Regarding the proposed patch for base.bbclass, xargs should > > generally > > always be called with --no-run-if-empty, unless there's a clear > > reason > > not to. > > Do we generally assume that we have a GNU xargs with --no-run-if- > empty > support? Calling rm -f without further arguments at least doesn't > cause > an error, so --no-run-if-empty is only a minor optimization in this > case. I've grepped bitbake, openembedded-core and meta-openembedded for --no- run-if-empty, and there is only a single instance in the whole code base - which is conditionalized so that the option is not passed on Darwin. I take from this that --no-run-if-empty is not acceptable in OpenEmbedded to ensure portability. > > I'll send an updated patch with the proposed changes later today. > > Kinds regards, > Matthias >