All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nícolas F. R. A. Prado" <nfraprado@protonmail.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Oded Gabbay <oded.gabbay@gmail.com>, Tom Rix <trix@redhat.com>,
	Vaibhav Jain <vaibhav@linux.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 08/39] scripts: get_abi.pl: prevent duplicated file names
Date: Tue, 08 Dec 2020 13:35:11 +0000	[thread overview]
Message-ID: <20201208133424.yrdzbb3bzqqtygtm@ArchWay.local> (raw)

On Fri, Oct 30, 2020 at 08:40:27AM +0100, Mauro Carvalho Chehab wrote:
> The same filename may exist on multiple directories within
> ABI. Create separate entries at the internal database for
> each of them.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
>  scripts/get_abi.pl | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl
> index e5a5588a8639..5612f019fae0 100755
> --- a/scripts/get_abi.pl
> +++ b/scripts/get_abi.pl
> @@ -65,7 +65,10 @@ sub parse_abi {
>  	my $name = $file;
>  	$name =~ s,.*/,,;
>  
> -	my $nametag = "File $name";
> +	my $fn = $file;
> +	$fn =~ s,Documentation/ABI/,,;
> +
> +	my $nametag = "File $fn";
>  	$data{$nametag}->{what} = "File $name";
>  	$data{$nametag}->{type} = "File";
>  	$data{$nametag}->{file} = $name;
> @@ -320,16 +323,18 @@ sub output_rest {
>  			my $fileref = "abi_file_".$path;
>  
>  			if ($type eq "File") {
> -				my $bar = $w;
> -				$bar =~ s/./-/g;
> -
>  				print ".. _$fileref:\n\n";
> -				print "$w\n$bar\n\n";
>  			} else {
>  				print "Defined on file :ref:`$f <$fileref>`\n\n";
>  			}
>  		}
>  
> +		if ($type eq "File") {
> +			my $bar = $w;
> +			$bar =~ s/./-/g;
> +			print "$w\n$bar\n\n";
> +		}
> +
>  		my $desc = "";
>  		$desc = $data{$what}->{description} if (defined($data{$what}->{description}));
>  		$desc =~ s/\s+$/\n/;
> -- 
> 2.26.2
> 

Hey Mauro,

just a heads-up.

It seems the ABI page is showing the full file names as shown in [1], like "File
/srv/docbuild/lib/git/linux/stable/firewire-cdev", while only the file name
would be enough, like "File firewire-cdev".

By reverting this patch I got exactly the intended behavior, but it seems you
were fixing other things with this, so perhaps just reverting is breaking
something that I can't see.

Could you look into what would be the right fix for this? :)

Thanks,
Nícolas

[1] https://www.kernel.org/doc/html/latest/admin-guide/abi.html


             reply	other threads:[~2020-12-08 13:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 13:35 Nícolas F. R. A. Prado [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-10-30  7:40 [PATCH v2 00/39] ABI: add it to the documentation build system Mauro Carvalho Chehab
2020-10-30  7:40 ` [PATCH v2 08/39] scripts: get_abi.pl: prevent duplicated file names Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201208133424.yrdzbb3bzqqtygtm@ArchWay.local \
    --to=nfraprado@protonmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=oded.gabbay@gmail.com \
    --cc=trix@redhat.com \
    --cc=vaibhav@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.