* [PATCH v2] kheaders: ignore and clean temporary kheaders_data directory
@ 2023-01-17 13:50 Thomas Weißschuh
2023-01-17 14:24 ` Masahiro Yamada
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Weißschuh @ 2023-01-17 13:50 UTC (permalink / raw)
To: Masahiro Yamada
Cc: linux-kernel, linux-kbuild, Nicolas Schier, Thomas Weißschuh
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.
Also add it to clean-files so it can be cleaned up by make.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Changes in v2:
- Also add the directory to clean-files
- Link to v1: https://lore.kernel.org/r/20230117-kernel-kheaders-gitignore-v1-1-2a3a070efd0d@weissschuh.net
---
| 1 +
| 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
--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/
--git a/kernel/Makefile b/kernel/Makefile
index 10ef068f598d..f3535944f635 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -156,4 +156,4 @@ quiet_cmd_genikh = CHK $(obj)/kheaders_data.tar.xz
$(obj)/kheaders_data.tar.xz: FORCE
$(call cmd,genikh)
-clean-files := kheaders_data.tar.xz kheaders.md5
+clean-files := kheaders_data.tar.xz kheaders.md5 kheaders_data.tar.xz.tmp
---
base-commit: d532dd102151cc69fcd00b13e5a9689b23c0c8d9
change-id: 20230117-kernel-kheaders-gitignore-f0d73456cb6b
Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] kheaders: ignore and clean temporary kheaders_data directory
2023-01-17 13:50 [PATCH v2] kheaders: ignore and clean temporary kheaders_data directory Thomas Weißschuh
@ 2023-01-17 14:24 ` Masahiro Yamada
2023-01-17 21:03 ` Nicolas Schier
2023-01-18 0:58 ` Thomas Weißschuh
0 siblings, 2 replies; 5+ messages in thread
From: Masahiro Yamada @ 2023-01-17 14:24 UTC (permalink / raw)
To: Thomas Weißschuh; +Cc: linux-kernel, linux-kbuild, Nicolas Schier
On Tue, Jan 17, 2023 at 10:50 PM Thomas Weißschuh <linux@weissschuh.net> 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.
> Also add it to clean-files so it can be cleaned up by make.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Or, just rename the temporary directory.
For example,
cpio_dir=$outdir/$(dirname $tarfile)/.tmp_cpio_dir
Dot files are ignored.
'make clean' removes the .tmp_* pattern.
> ---
> Changes in v2:
> - Also add the directory to clean-files
> - Link to v1: https://lore.kernel.org/r/20230117-kernel-kheaders-gitignore-v1-1-2a3a070efd0d@weissschuh.net
> ---
> kernel/.gitignore | 1 +
> kernel/Makefile | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> 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/
> diff --git a/kernel/Makefile b/kernel/Makefile
> index 10ef068f598d..f3535944f635 100644
> --- a/kernel/Makefile
> +++ b/kernel/Makefile
> @@ -156,4 +156,4 @@ quiet_cmd_genikh = CHK $(obj)/kheaders_data.tar.xz
> $(obj)/kheaders_data.tar.xz: FORCE
> $(call cmd,genikh)
>
> -clean-files := kheaders_data.tar.xz kheaders.md5
> +clean-files := kheaders_data.tar.xz kheaders.md5 kheaders_data.tar.xz.tmp
>
> ---
> base-commit: d532dd102151cc69fcd00b13e5a9689b23c0c8d9
> change-id: 20230117-kernel-kheaders-gitignore-f0d73456cb6b
>
> Best regards,
> --
> Thomas Weißschuh <linux@weissschuh.net>
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] kheaders: ignore and clean temporary kheaders_data directory
2023-01-17 14:24 ` Masahiro Yamada
@ 2023-01-17 21:03 ` Nicolas Schier
2023-01-18 0:58 ` Thomas Weißschuh
1 sibling, 0 replies; 5+ messages in thread
From: Nicolas Schier @ 2023-01-17 21:03 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Thomas Weißschuh, linux-kernel, linux-kbuild, Nicolas Schier
[-- Attachment #1: Type: text/plain, Size: 2304 bytes --]
On Tue, Jan 17, 2023 at 11:24:47PM +0900 Masahiro Yamada wrote:
> On Tue, Jan 17, 2023 at 10:50 PM Thomas Weißschuh <linux@weissschuh.net> 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.
> > Also add it to clean-files so it can be cleaned up by make.
> >
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>
>
> Or, just rename the temporary directory.
> For example,
>
> cpio_dir=$outdir/$(dirname $tarfile)/.tmp_cpio_dir
>
>
>
> Dot files are ignored.
> 'make clean' removes the .tmp_* pattern.
yes, almost unbeatable. Can we use '${tarfile%/*}' instead of '$(dirname
$tarfile)'?
Kind regards,
Nicolas
> > ---
> > Changes in v2:
> > - Also add the directory to clean-files
> > - Link to v1: https://lore.kernel.org/r/20230117-kernel-kheaders-gitignore-v1-1-2a3a070efd0d@weissschuh.net
> > ---
> > kernel/.gitignore | 1 +
> > kernel/Makefile | 2 +-
> > 2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > 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/
> > diff --git a/kernel/Makefile b/kernel/Makefile
> > index 10ef068f598d..f3535944f635 100644
> > --- a/kernel/Makefile
> > +++ b/kernel/Makefile
> > @@ -156,4 +156,4 @@ quiet_cmd_genikh = CHK $(obj)/kheaders_data.tar.xz
> > $(obj)/kheaders_data.tar.xz: FORCE
> > $(call cmd,genikh)
> >
> > -clean-files := kheaders_data.tar.xz kheaders.md5
> > +clean-files := kheaders_data.tar.xz kheaders.md5 kheaders_data.tar.xz.tmp
> >
> > ---
> > base-commit: d532dd102151cc69fcd00b13e5a9689b23c0c8d9
> > change-id: 20230117-kernel-kheaders-gitignore-f0d73456cb6b
> >
> > Best regards,
> > --
> > Thomas Weißschuh <linux@weissschuh.net>
> >
>
>
> --
> Best Regards
>
>
> Masahiro Yamada
--
epost|xmpp: nicolas@fjasle.eu irc://oftc.net/nsc
↳ gpg: 18ed 52db e34f 860e e9fb c82b 7d97 0932 55a0 ce7f
-- frykten for herren er opphav til kunnskap --
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] kheaders: ignore and clean temporary kheaders_data directory
2023-01-17 14:24 ` Masahiro Yamada
2023-01-17 21:03 ` Nicolas Schier
@ 2023-01-18 0:58 ` Thomas Weißschuh
2023-01-18 5:02 ` Masahiro Yamada
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Weißschuh @ 2023-01-18 0:58 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-kernel, linux-kbuild, Nicolas Schier
On Tue, Jan 17, 2023 at 11:24:47PM +0900, Masahiro Yamada wrote:
> On Tue, Jan 17, 2023 at 10:50 PM Thomas Weißschuh <linux@weissschuh.net> 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.
> > Also add it to clean-files so it can be cleaned up by make.
> >
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>
>
> Or, just rename the temporary directory.
> For example,
>
> cpio_dir=$outdir/$(dirname $tarfile)/.tmp_cpio_dir
>
>
>
> Dot files are ignored.
> 'make clean' removes the .tmp_* pattern.
This sounds great.
Unfortunately 'make clean' only cleans files and not directories based
on this pattern.
Should it be extended?
> > ---
> > Changes in v2:
> > - Also add the directory to clean-files
> > - Link to v1: https://lore.kernel.org/r/20230117-kernel-kheaders-gitignore-v1-1-2a3a070efd0d@weissschuh.net
> > ---
> > kernel/.gitignore | 1 +
> > kernel/Makefile | 2 +-
> > 2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > 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/
> > diff --git a/kernel/Makefile b/kernel/Makefile
> > index 10ef068f598d..f3535944f635 100644
> > --- a/kernel/Makefile
> > +++ b/kernel/Makefile
> > @@ -156,4 +156,4 @@ quiet_cmd_genikh = CHK $(obj)/kheaders_data.tar.xz
> > $(obj)/kheaders_data.tar.xz: FORCE
> > $(call cmd,genikh)
> >
> > -clean-files := kheaders_data.tar.xz kheaders.md5
> > +clean-files := kheaders_data.tar.xz kheaders.md5 kheaders_data.tar.xz.tmp
> >
> > ---
> > base-commit: d532dd102151cc69fcd00b13e5a9689b23c0c8d9
> > change-id: 20230117-kernel-kheaders-gitignore-f0d73456cb6b
> >
> > Best regards,
> > --
> > Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] kheaders: ignore and clean temporary kheaders_data directory
2023-01-18 0:58 ` Thomas Weißschuh
@ 2023-01-18 5:02 ` Masahiro Yamada
0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2023-01-18 5:02 UTC (permalink / raw)
To: Thomas Weißschuh; +Cc: linux-kernel, linux-kbuild, Nicolas Schier
On Wed, Jan 18, 2023 at 10:10 AM Thomas Weißschuh <linux@weissschuh.net> wrote:
>
> On Tue, Jan 17, 2023 at 11:24:47PM +0900, Masahiro Yamada wrote:
> > On Tue, Jan 17, 2023 at 10:50 PM Thomas Weißschuh <linux@weissschuh.net> 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.
> > > Also add it to clean-files so it can be cleaned up by make.
> > >
> > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> >
> >
> > Or, just rename the temporary directory.
> > For example,
> >
> > cpio_dir=$outdir/$(dirname $tarfile)/.tmp_cpio_dir
> >
> >
> >
> > Dot files are ignored.
> > 'make clean' removes the .tmp_* pattern.
>
> This sounds great.
>
> Unfortunately 'make clean' only cleans files and not directories based
> on this pattern.
Agh, you are right.
Can you extend .tmp_* to match any file type?
Maybe, something like this?
\( -name '*.[aios]' -o [snip] '*.*.symversions' \) -type f -print
-o -name '.tmp_*' -print
>
> Should it be extended?
>
> > > ---
> > > Changes in v2:
> > > - Also add the directory to clean-files
> > > - Link to v1: https://lore.kernel.org/r/20230117-kernel-kheaders-gitignore-v1-1-2a3a070efd0d@weissschuh.net
> > > ---
> > > kernel/.gitignore | 1 +
> > > kernel/Makefile | 2 +-
> > > 2 files changed, 2 insertions(+), 1 deletion(-)
> > >
> > > 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/
> > > diff --git a/kernel/Makefile b/kernel/Makefile
> > > index 10ef068f598d..f3535944f635 100644
> > > --- a/kernel/Makefile
> > > +++ b/kernel/Makefile
> > > @@ -156,4 +156,4 @@ quiet_cmd_genikh = CHK $(obj)/kheaders_data.tar.xz
> > > $(obj)/kheaders_data.tar.xz: FORCE
> > > $(call cmd,genikh)
> > >
> > > -clean-files := kheaders_data.tar.xz kheaders.md5
> > > +clean-files := kheaders_data.tar.xz kheaders.md5 kheaders_data.tar.xz.tmp
> > >
> > > ---
> > > base-commit: d532dd102151cc69fcd00b13e5a9689b23c0c8d9
> > > change-id: 20230117-kernel-kheaders-gitignore-f0d73456cb6b
> > >
> > > Best regards,
> > > --
> > > Thomas Weißschuh <linux@weissschuh.net>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-18 5:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17 13:50 [PATCH v2] kheaders: ignore and clean temporary kheaders_data directory Thomas Weißschuh
2023-01-17 14:24 ` Masahiro Yamada
2023-01-17 21:03 ` Nicolas Schier
2023-01-18 0:58 ` Thomas Weißschuh
2023-01-18 5:02 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox