Skip to content

Commit be7b08e

Browse files
pm215Michael Tokarev
authored andcommitted
docs: Don't define duplicate label in qemu-block-drivers.rst.inc
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 1eeb432 "doc/sphinx/hxtool.py: add optional label argument to SRST directive"). Unfortunately in commit 7f63144 ("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: [email protected] Fixes: 1eeb432 "doc/sphinx/hxtool.py: add optional label argument to SRST directive" Reported-by: Dario Faggioli <[email protected]> Signed-off-by: Peter Maydell <[email protected]> Acked-by: Eric Blake <[email protected]> Reviewed-by: Pierrick Bouvier <[email protected]> Message-id: [email protected] (cherry picked from commit 82707dd) Signed-off-by: Michael Tokarev <[email protected]>
1 parent ac32612 commit be7b08e

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

docs/devel/codebase.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ yet, so sometimes the source code is all you have.
116116
* `monitor <https://gitlab.com/qemu-project/qemu/-/tree/master/monitor>`_:
117117
`Monitor <QEMU monitor>` implementation (HMP & QMP).
118118
* `nbd <https://gitlab.com/qemu-project/qemu/-/tree/master/nbd>`_:
119-
QEMU `NBD (Network Block Device) <nbd>` server.
119+
QEMU NBD (Network Block Device) server.
120120
* `net <https://gitlab.com/qemu-project/qemu/-/tree/master/net>`_:
121121
Network (host) support.
122122
* `pc-bios <https://gitlab.com/qemu-project/qemu/-/tree/master/pc-bios>`_:

docs/system/qemu-block-drivers.rst.inc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,6 @@ What you should *never* do:
500500
- expect it to work when loadvm'ing
501501
- write to the FAT directory on the host system while accessing it with the guest system
502502

503-
.. _nbd:
504-
505503
NBD access
506504
~~~~~~~~~~
507505

0 commit comments

Comments
 (0)