Re: [PATCH] scripts/get_abi.pl: ignore some temp files

From: Jonathan Corbet
Date: Wed Jan 03 2024 - 16:03:39 EST


Randy Dunlap <rdunlap@xxxxxxxxxxxxx> writes:

> When there are filenames of the form ".orig" or ".rej" in
> the Documenatation/ABI/ subdirectories, there can be confusing or
> erroneous output generated. Example: the file
> Documenation/ABI/testing/sysfs-bus-papr-pmem.orig causes this
> warning message:
>
> Documentation/ABI/testing/sysfs-bus-papr-pmem:2: WARNING: unknown document: '/powerpc/papr_hcalls'
>
> Prevent this by skipping over filenames that may be created by
> patch/diff tools etc.
>
> Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: Jonathan Corbet <corbet@xxxxxxx>
> Cc: linux-doc@xxxxxxxxxxxxxxx
> Acked-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
> ---
> scripts/get_abi.pl | 1 +
> 1 file changed, 1 insertion(+)
>
> diff -- a/scripts/get_abi.pl b/scripts/get_abi.pl
> --- a/scripts/get_abi.pl
> +++ b/scripts/get_abi.pl
> @@ -93,6 +93,7 @@ sub parse_abi {
> return if ($mode & S_IFDIR);
> return if ($file =~ m,/README,);
> return if ($file =~ m,/\.,);
> + return if ($file =~ m,\.(rej|org|orig|bak)$,);

Applied, thanks.

It would have been nice to create all of those files with a .abi
extension so we didn't have to do this kind of blocklisting, but so be
it.

Should we exclude emacs-style ~ files too?

jon