Skip to contentSkip to conversation

docs: Disambiguate a pair of rST labels

PATCH In review James Addison 4 participants 7 messages Feb 22, 2025 – Feb 27, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs: Disambiguate a pair of rST labels

Because reStructuredText does not provide lexical scoping rules for labels, resolution of targets that have duplicate declarations is ambiguous and produces nondeterministic output.

To improve the reproducibility of the HTML documentation, disambiguate two labels both previously titled "submit_improvements".

---
 Documentation/admin-guide/quickly-build-trimmed-linux.rst     | 4 ++--
 .../admin-guide/verify-bugs-and-bisect-regressions.rst        | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/Documentation/admin-guide/quickly-build-trimmed-linux.rst index 07cfd8863..2d1b6f750 100644

Documentation/admin-guide/quickly-build-trimmed-linux.rst +1 -1
@@ -347,7 +347,7 @@ again.
 
    [:ref:`details<uninstall>`]
 
-.. _submit_improvements:
+.. _submit_trimmed_build_improvements:
 
 Did you run into trouble following any of the above steps that is not

cleared up
by the reference section below? Or do you have ideas how to improve the text?
@@ -1070,7 +1070,7 @@ complicated, and harder to follow.

That being said: this of course is a balancing act. Hence, if you think an additional use-case is worth describing, suggest it to the maintainers of this
-document, as :ref:described above <submit_improvements>. +document, as :ref:described above <submit_trimmed_build_improvements>.

..

(quoted diff) +0 -0

b/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst index 03c551513..1b246d8a8 100644

Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst +0 -0
@@ -267,7 +267,7 @@ culprit might be known already. For further

details on what actually qualifies
as a regression check out Documentation/admin-guide/reporting-regressions.rst.

If you run into any problems while following this guide or have ideas how to
-improve it, :ref:please let the kernel developers know <submit_improvements>. +improve it, :ref:please let the kernel developers know <submit_regression_tracing_improvements>.

.. _introprep_bissbs:

@@ -1055,7 +1055,7 @@ follow these instructions.

[:ref:details <introoptional_bisref>]

-.. _submit_improvements:
+.. _submit_regression_tracing_improvements:

Conclusion
----------

Signature · 1 line
2.47.2
#1 lore raw

Documentation/admin-guide/quickly-build-trimmed-linux.rst

Quoted 3 lines · James Addison
Documentation/admin-guide/quickly-build-trimmed-linux.rst +0 -0
index 07cfd8863..2d1b6f750 100644

Looks like your email client mangles the patch (the header above should not split). Please resend, preferably with git-send-email(1).

Thanks.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#2 lore raw

v2 cover reproducible sphinx docs

In reply to James Addison

From: Jelle van der Waa <[email protected]>

James Addison brought up this patch regarding reproducible kernel documentation and I volunteered to re-send it as they have issues setting up a MTA.

With this patch Arch Linux is able to succesfully when building on the same machine, without this patch it is currently not reproducible see the link below:

https://reproducible.archlinux.org/api/v0/builds/742727/diffoscope

James Addison (1):
docs: Disambiguate a pair of rST labels

 Documentation/admin-guide/quickly-build-trimmed-linux.rst     | 4 ++--
 .../admin-guide/verify-bugs-and-bisect-regressions.rst        | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.48.1
#3 lore raw

Re: [v2 0/1] reproducible sphinx docs

Quoted 5 lines · Jelle van der Waa

From: Jelle van der Waa <[email protected]>

James Addison brought up this patch regarding reproducible kernel documentation and I volunteered to re-send it as they have issues setting up a MTA.

Thank you for forwarding the patch! I might have to send my own version otherwise.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#4 lore raw

PATCH v2 1/1 docs: Disambiguate a pair of rST labels

In reply to James Addison

From: James Addison <[email protected]>

According to the reStructuredText documentation, internal hyperlink targets[1] are intended to resolve within the current document.

Sphinx has a bug that causes internal hyperlinks declared with duplicate names to resolve nondeterministically, producing incorrect documentation. Sphinx does not yet emit a warning when these duplicate target names are declared.

To improve the reproducibility and correctness of the HTML documentation, disambiguate two labels both previously titled "submit_improvements".

[1] - https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#hyperlink-targets

---
V1 -> V2: re-send using different email client

---
 Documentation/admin-guide/quickly-build-trimmed-linux.rst     | 4 ++--
 .../admin-guide/verify-bugs-and-bisect-regressions.rst        | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
Documentation/admin-guide/quickly-build-trimmed-linux.rst +2 -2
index 07cfd8863b46..2d1b6f7504c1 100644
@@ -347,7 +347,7 @@ again.
 
    [:ref:`details<uninstall>`]
 
-.. _submit_improvements:
+.. _submit_trimmed_build_improvements:
 
 Did you run into trouble following any of the above steps that is not cleared up
 by the reference section below? Or do you have ideas how to improve the text?
@@ -1070,7 +1070,7 @@ complicated, and harder to follow.
 
 That being said: this of course is a balancing act. Hence, if you think an
 additional use-case is worth describing, suggest it to the maintainers of this
-document, as :ref:`described above <submit_improvements>`.
+document, as :ref:`described above <submit_trimmed_build_improvements>`.
 
 
 ..
Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst +2 -2
index 03c55151346c..1b246d8a8afb 100644
@@ -267,7 +267,7 @@ culprit might be known already. For further details on what actually qualifies
 as a regression check out Documentation/admin-guide/reporting-regressions.rst.
 
 If you run into any problems while following this guide or have ideas how to
-improve it, :ref:`please let the kernel developers know <submit_improvements>`.
+improve it, :ref:`please let the kernel developers know <submit_regression_tracing_improvements>`.
 
 .. _introprep_bissbs:
 
@@ -1055,7 +1055,7 @@ follow these instructions.
 
 [:ref:`details <introoptional_bisref>`]
 
-.. _submit_improvements:
+.. _submit_regression_tracing_improvements:
 
 Conclusion
 ----------
Signature · 1 line
2.48.1
Reviewed-by on v2 1/1
#5 lore raw

[Cc'ing Thorsten and Jon]

Quoted 5 lines · Jelle van der Waa

From: James Addison <[email protected]>

According to the reStructuredText documentation, internal hyperlink targets[1] are intended to resolve within the current document.

Quoted 8 lines

Sphinx has a bug that causes internal hyperlinks declared with duplicate names to resolve nondeterministically, producing incorrect documentation. Sphinx does not yet emit a warning when these duplicate target names are declared.

To improve the reproducibility and correctness of the HTML documentation, disambiguate two labels both previously titled "submit_improvements".

On docs.kernel.org, I click "described above" link on quickly build kernel guide [1] which takes me to bisection guide instead [2]. Now with this patch, the same link now points to suggestions and improvements on the same page.

[1]: https://docs.kernel.org/admin-guide/quickly-build-trimmed-linux.html
[2]: https://docs.kernel.org/admin-guide/verify-bugs-and-bisect-regressions.html#submit-improvements

Quoted 49 lines

[1] - https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#hyperlink-targets

---
V1 -> V2: re-send using different email client

---
 Documentation/admin-guide/quickly-build-trimmed-linux.rst     | 4 ++--
 .../admin-guide/verify-bugs-and-bisect-regressions.rst        | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
Documentation/admin-guide/quickly-build-trimmed-linux.rst +2 -2
index 07cfd8863b46..2d1b6f7504c1 100644
@@ -347,7 +347,7 @@ again.
 
    [:ref:`details<uninstall>`]
 
-.. _submit_improvements:
+.. _submit_trimmed_build_improvements:
 
 Did you run into trouble following any of the above steps that is not cleared up
 by the reference section below? Or do you have ideas how to improve the text?
@@ -1070,7 +1070,7 @@ complicated, and harder to follow.
 
 That being said: this of course is a balancing act. Hence, if you think an
 additional use-case is worth describing, suggest it to the maintainers of this
-document, as :ref:`described above <submit_improvements>`.
+document, as :ref:`described above <submit_trimmed_build_improvements>`.
 
 
..
Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst +1 -1
index 03c55151346c..1b246d8a8afb 100644
@@ -267,7 +267,7 @@ culprit might be known already. For further details on what actually qualifies
 as a regression check out Documentation/admin-guide/reporting-regressions.rst.
 
 If you run into any problems while following this guide or have ideas how to
-improve it, :ref:`please let the kernel developers know <submit_improvements>`.
+improve it, :ref:`please let the kernel developers know <submit_regression_tracing_improvements>`.
 
 .. _introprep_bissbs:
 

Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst follow these instructions. · line 1061

Quoted 8 lines
Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst +1 -1
@@ -1055,7 +1055,7 @@ follow these instructions.
 
 [:ref:`details <introoptional_bisref>`]
 
-.. _submit_improvements:
+.. _submit_regression_tracing_improvements:
 
 Conclusion
 ----------

The patch itself looks good.

Thanks.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#6 lore raw
In reply to Jelle van der Waa
Quoted 14 lines · Jelle van der Waa

From: James Addison <[email protected]>

According to the reStructuredText documentation, internal hyperlink targets[1] are intended to resolve within the current document.

Sphinx has a bug that causes internal hyperlinks declared with duplicate names to resolve nondeterministically, producing incorrect documentation. Sphinx does not yet emit a warning when these duplicate target names are declared.

To improve the reproducibility and correctness of the HTML documentation, disambiguate two labels both previously titled "submit_improvements".

Quoted 7 lines

[1] - https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#hyperlink-targets

---
V1 -> V2: re-send using different email client

Many thx for looking into this. FWIW, next time please run ./scripts/get_maintainer.pl and then ensure to add the maintainers of the modified files to the list of recipients.

Quoted 10 lines
---
 Documentation/admin-guide/quickly-build-trimmed-linux.rst     | 4 ++--
 .../admin-guide/verify-bugs-and-bisect-regressions.rst        | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
Documentation/admin-guide/quickly-build-trimmed-linux.rst +0 -0
index 07cfd8863b46..2d1b6f7504c1 100644

Documentation/admin-guide/quickly-build-trimmed-linux.rst again. · line 350

Quoted 5 lines
Documentation/admin-guide/quickly-build-trimmed-linux.rst +1 -1
@@ -347,7 +347,7 @@ again.
 
    [:ref:`details<uninstall>`]
 
-.. _submit_improvements:
+.. _submit_trimmed_build_improvements:

Hmm. Does not matter much, but adding that "trimmed_build" in the middle feels quite a bit odd to me. I recently in a similar situation added a short suffix; here it could be "_qbtl", which is derived from the initials of the file modified. I'd say that is a lot better, but using something longer is fine for me as well, especially if it's only needed in one or two places.

Quoted 25 lines
Documentation/admin-guide/quickly-build-trimmed-linux.rst +1 -1
 Did you run into trouble following any of the above steps that is not cleared up
 by the reference section below? Or do you have ideas how to improve the text?
@@ -1070,7 +1070,7 @@ complicated, and harder to follow.
 
 That being said: this of course is a balancing act. Hence, if you think an
 additional use-case is worth describing, suggest it to the maintainers of this
-document, as :ref:`described above <submit_improvements>`.
+document, as :ref:`described above <submit_trimmed_build_improvements>`.
 
 
..
Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst +1 -1
index 03c55151346c..1b246d8a8afb 100644
@@ -267,7 +267,7 @@ culprit might be known already. For further details on what actually qualifies
 as a regression check out Documentation/admin-guide/reporting-regressions.rst.
 
 If you run into any problems while following this guide or have ideas how to
-improve it, :ref:`please let the kernel developers know <submit_improvements>`.
+improve it, :ref:`please let the kernel developers know <submit_regression_tracing_improvements>`.
 
 .. _introprep_bissbs:
 

Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst follow these instructions. · line 1058

Quoted 5 lines
Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst +1 -1
@@ -1055,7 +1055,7 @@ follow these instructions.
 
 [:ref:`details <introoptional_bisref>`]
 
-.. _submit_improvements:
+.. _submit_regression_tracing_improvements:

Same here with a different suffix.

Ciao, Thorsten