linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scripts/get_abi.pl: Ignore hidden files
@ 2022-01-28 20:13 Jonathan Neuschäfer
  2022-01-28 20:45 ` Jonathan Neuschäfer
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Neuschäfer @ 2022-01-28 20:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-doc, Jonathan Neuschäfer, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Jonathan Corbet

get_abi.pl currently collects every file in Documentation/ABI. This
causes a UnicodeDecodeError in Documentation/sphinx/kernel_api.py,
when it finds my Vim swap files (.foo.swp) in the directory.

To avoid such issues, ignore hidden files in get_api.pl.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
 scripts/get_abi.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl
index 6212f58b69c61..47b7eca5b0b71 100755
--- a/scripts/get_abi.pl
+++ b/scripts/get_abi.pl
@@ -92,6 +92,7 @@ sub parse_abi {
 	my $mode = (stat($file))[2];
 	return if ($mode & S_IFDIR);
 	return if ($file =~ m,/README,);
+	return if ($file =~ m,/\.,);

 	my $name = $file;
 	$name =~ s,.*/,,;
--
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scripts/get_abi.pl: Ignore hidden files
  2022-01-28 20:13 [PATCH] scripts/get_abi.pl: Ignore hidden files Jonathan Neuschäfer
@ 2022-01-28 20:45 ` Jonathan Neuschäfer
  2022-01-28 21:00   ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Neuschäfer @ 2022-01-28 20:45 UTC (permalink / raw)
  To: Jonathan Neuschäfer
  Cc: linux-kernel, linux-doc, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Jonathan Corbet

[-- Attachment #1: Type: text/plain, Size: 957 bytes --]

On Fri, Jan 28, 2022 at 09:13:53PM +0100, Jonathan Neuschäfer wrote:
> get_abi.pl currently collects every file in Documentation/ABI. This
> causes a UnicodeDecodeError in Documentation/sphinx/kernel_api.py,

Ooops, this should be kernel_abi.py.


> when it finds my Vim swap files (.foo.swp) in the directory.
> 
> To avoid such issues, ignore hidden files in get_api.pl.

... and get_abi.pl.


> 
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> ---
>  scripts/get_abi.pl | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl
> index 6212f58b69c61..47b7eca5b0b71 100755
> --- a/scripts/get_abi.pl
> +++ b/scripts/get_abi.pl
> @@ -92,6 +92,7 @@ sub parse_abi {
>  	my $mode = (stat($file))[2];
>  	return if ($mode & S_IFDIR);
>  	return if ($file =~ m,/README,);
> +	return if ($file =~ m,/\.,);
> 
>  	my $name = $file;
>  	$name =~ s,.*/,,;
> --
> 2.34.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scripts/get_abi.pl: Ignore hidden files
  2022-01-28 20:45 ` Jonathan Neuschäfer
@ 2022-01-28 21:00   ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2022-01-28 21:00 UTC (permalink / raw)
  To: Jonathan Neuschäfer
  Cc: linux-kernel, linux-doc, Greg Kroah-Hartman, Jonathan Corbet

Em Fri, 28 Jan 2022 21:45:52 +0100
Jonathan Neuschäfer <j.neuschaefer@gmx.net> escreveu:

> On Fri, Jan 28, 2022 at 09:13:53PM +0100, Jonathan Neuschäfer wrote:
> > get_abi.pl currently collects every file in Documentation/ABI. This
> > causes a UnicodeDecodeError in Documentation/sphinx/kernel_api.py,  
> 
> Ooops, this should be kernel_abi.py.
> 

After addressing your comment about the kernel_abi.py file, feel free
to add:

Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>

> 
> > when it finds my Vim swap files (.foo.swp) in the directory.
> > 
> > To avoid such issues, ignore hidden files in get_api.pl.  
> 
> ... and get_abi.pl.
> 
> 
> > 
> > Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> > ---
> >  scripts/get_abi.pl | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl
> > index 6212f58b69c61..47b7eca5b0b71 100755
> > --- a/scripts/get_abi.pl
> > +++ b/scripts/get_abi.pl
> > @@ -92,6 +92,7 @@ sub parse_abi {
> >  	my $mode = (stat($file))[2];
> >  	return if ($mode & S_IFDIR);
> >  	return if ($file =~ m,/README,);
> > +	return if ($file =~ m,/\.,);
> > 
> >  	my $name = $file;
> >  	$name =~ s,.*/,,;
> > --
> > 2.34.1

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-28 21:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-28 20:13 [PATCH] scripts/get_abi.pl: Ignore hidden files Jonathan Neuschäfer
2022-01-28 20:45 ` Jonathan Neuschäfer
2022-01-28 21:00   ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).