qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
	"Dario Faggioli" <dfaggioli@suse.com>
Subject: Re: [PATCH] docs: Don't define duplicate label in qemu-block-drivers.rst.inc
Date: Sat, 3 May 2025 12:36:05 -0700	[thread overview]
Message-ID: <f35f97fa-8fb5-400f-b126-10055a0bffe4@linaro.org> (raw)
In-Reply-To: <20250501093126.716667-1-peter.maydell@linaro.org>

On 5/1/25 2:31 AM, Peter Maydell wrote:
> Sphinx requires that labels within documents are unique across the
> whole manual.  This is because the "create a hyperlink" directive
> specifies only the name of the label, not a filename+label.  Some
> Sphinx versions will warn about duplicate labels, but even if there
> is no warning there is still an ambiguity and no guarantee that the
> hyperlink will be created to the right target.
> 
> For QEMU this is awkward, because we have various .rst.inc fragments
> which we include into multiple .rst files.  If you define a label in
> the .rst.inc file then it will be a duplicate label.  We have mostly
> worked around this by not putting labels into those .rst.inc files,
> or by adding "insert a label" functionality into the hxtool extension
> (see commit 1eeb432a953b0 "doc/sphinx/hxtool.py: add optional label
> argument to SRST directive").
> 
> Unfortunately in commit 7f6314427e78 ("docs/devel: add a codebase
> section") we accidentally added a duplicate label, because not all
> Sphinx versions warn about the mistake.
> 
> In this case the link was only from the developer docs codebase
> summary, so as the simplest fix for the stable branch, we drop
> the link entirely.
> 
> Cc: qemu-stable@nongnu.org
> Fixes: 1eeb432a953b0 "doc/sphinx/hxtool.py: add optional label argument to SRST directive"
> Reported-by: Dario Faggioli <dfaggioli@suse.com>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> I have a proposal for how we could permit this link:
>   https://patchew.org/QEMU/20250429163212.618953-1-peter.maydell@linaro.org/
> but since that adds a new Sphinx extension it's a little heavyweight
> to backport to the stable branches, so I thought I'd send out
> this "just drop the link" patch as our fix for stable.
> 
>   docs/devel/codebase.rst                | 2 +-
>   docs/system/qemu-block-drivers.rst.inc | 2 --
>   2 files changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>



      parent reply	other threads:[~2025-05-03 19:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-01  9:31 [PATCH] docs: Don't define duplicate label in qemu-block-drivers.rst.inc Peter Maydell
2025-05-01 13:48 ` Eric Blake
2025-05-03 19:36 ` Pierrick Bouvier [this message]

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=f35f97fa-8fb5-400f-b126-10055a0bffe4@linaro.org \
    --to=pierrick.bouvier@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=dfaggioli@suse.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /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 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).