Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4829499rwb; Tue, 17 Jan 2023 06:07:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXuckgH1Upn1TIIjKzTxedU1zAm3JPL+kdIJ0nE8Ou1NEfF2WUCQwgDuOOQtywa6M8zm1/Vs X-Received: by 2002:a17:902:ccc9:b0:194:749a:1e78 with SMTP id z9-20020a170902ccc900b00194749a1e78mr3853193ple.40.1673964461146; Tue, 17 Jan 2023 06:07:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673964461; cv=none; d=google.com; s=arc-20160816; b=a99xmViGE/6b38XXn6dteqKz+u+bpINqEB/huU2DjwwCzNwrp0dJiw9eCjnAHh2Evz wCWyEARia+57esGH0MOcmKsRXbgjHU9TZKM/P2gBroldybPsC9gjjrt7VFZkcMl1b73J W/vcG5foVxOpFJMw7Wo6PfFkNZC3Xrzf+8idTIQCDapUlm6n1SWU1NuLFy9s+p7sJesy CT2Vmur58BEOjoWM0lFxR2QNyZwEY5mm8QKQ6jQBjQpBdinfX4QePeFJn18qFLhdRm+5 uERmJN5bdsRpnB5udR5OsblJJbOUbBQTdTQmLKaXzAPxBwyYVVNom3hGjrRPJB3O7fdW 0QBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:date; bh=pGmb5tyQa0KCxAnT2bXkHAcr5HNwY4vBiZ+RD8vVXT4=; b=NUxd8aSJfXN/qzJ4DGcz87vYoq5ZCffCKE4rlT0IDT2D8P8p6b2wHNWjicsC3yM03x o3DsE5JIN6mBerP3BBgJquov2v4IA1IgVq6srpT5YYOCQgUEErB2PWWbPNTaZVrfjL64 JQxbFuB0N7UL313jlrsmKIyRqDrq8TiHCh/AoGFF6XbqLgGv5Qykmp5m+ldsgbHbINk+ 0bXE9Fk6zpwitpP59X491h+F8L8zbk8Z+8xPWplPzRn0lZhcGgjh/fzTUZ/q7p3JVTJc B2xIHWkfHcwvmrGtmlcXv4PL0o8hBohlJpJIiOO46AAmNUyUMzgiDryZFkL7rskLDlDv uCag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@weissschuh.net header.s=mail header.b=OMfmUovD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t9-20020a17090340c900b001943dcf2035si22731083pld.460.2023.01.17.06.07.08; Tue, 17 Jan 2023 06:07:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@weissschuh.net header.s=mail header.b=OMfmUovD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230191AbjAQNx0 (ORCPT + 48 others); Tue, 17 Jan 2023 08:53:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231217AbjAQNxE (ORCPT ); Tue, 17 Jan 2023 08:53:04 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5B1A3C2A3; Tue, 17 Jan 2023 05:52:12 -0800 (PST) Date: Tue, 17 Jan 2023 13:52:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1673963530; bh=3rWEGZOUr60uGBv8riGkTZ/UN/j6SPZdmfmhK0SEaZQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OMfmUovDF3e2N8f2jfQJ+AZV9Ba5ItyUVHG253dDNK0QMuxDhlc1DFuSeRjp/HVDa cudbwzK6hLNQMNfHTX/+DKHP/arFWKO62LwsSVH7f9O8Q73v62WIojRJZQWsyVgB5S eYGAzif4b1GHCTUOv+OcD46XEkaNxp4u9YWZ+Pqo= From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Nicolas Schier Cc: Masahiro Yamada , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH] kernel/.gitignore: ignore temporary kheaders_data directory Message-ID: <20230117135208.pyyziocg7kc25vfy@t-8ch.de> References: <20230117-kernel-kheaders-gitignore-v1-1-2a3a070efd0d@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 17, 2023 at 09:34:01AM +0100, Nicolas Schier wrote: > On Tue, Jan 17, 2023 at 05:15:25AM +0000, Thomas Wei?schuh wrote: > > If the kheaders archive generation is interrupted then this directory > > may be left. Ignore it, it will be deleted by the next run of > > kernel/gen_kheaders.sh. > > > > Signed-off-by: Thomas Wei?schuh > > --- > > kernel/.gitignore | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/kernel/.gitignore b/kernel/.gitignore > > index c6b299a6b786..57ab1d703763 100644 > > --- a/kernel/.gitignore > > +++ b/kernel/.gitignore > > @@ -1,3 +1,4 @@ > > # SPDX-License-Identifier: GPL-2.0-only > > /config_data > > /kheaders.md5 > > +/kheaders_data.tar.xz.tmp/ > > What about removing the temporary directory on failure instead? E.g.: > > diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh > index 473036b43c83..c656b72a3cdc 100755 > --- a/kernel/gen_kheaders.sh > +++ b/kernel/gen_kheaders.sh > @@ -61,6 +61,8 @@ echo " GEN $tarfile" > rm -rf $cpio_dir > mkdir $cpio_dir > > +trap "rm -rf ${cpio_dir}" EXIT > + > if [ "$building_out_of_srctree" ]; then > ( > cd $srctree > > > Otherwise, I'd suggest to extent this .gitignore patch by also adding > > clean-files += kheaders_data.tar.xz.tmp/ > > to kernel/Makefile. Thanks for the suggestions. I went with the clean-files aproach. This allows the introspection of the directory on errors and seems to match what is done elsewhere. Thomas