[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8ZdGIDj+0nSqjkF@buildd.core.avm.de>
Date: Tue, 17 Jan 2023 09:34:01 +0100
From: Nicolas Schier <n.schier@....de>
To: Thomas Weißschuh <linux@...ssschuh.net>
Cc: Masahiro Yamada <masahiroy@...nel.org>,
linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org
Subject: Re: [PATCH] kernel/.gitignore: ignore temporary kheaders_data
directory
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 <linux@...ssschuh.net>
> ---
> 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.
Kind regards,
Nicolas
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists