1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 00:39:46 +00:00

docs: replace `FOO by :term:FOO` where possible

If a variable has a glossary entry and some rST files write about those
variables, it's better to point to the glossary entry instead of just
highlighting it by surrounding it with two tick quotes.

This was automated by the following python script:
"""
import re
from pathlib import Path

with open('objects.inv.txt', 'r') as f:
    objects = f.readlines()

with open('bitbake-objects.inv.txt', 'r') as f:
    objects = objects + f.readlines()

re_term = re.compile(r'variables.html#term-([A-Z_0-9]*)')
terms = []

for obj in objects:
    match = re_term.search(obj)
    if match and match.group(1):
        terms.append(match.group(1))

for rst in Path('.').rglob('*.rst'):
    with open(rst, 'r') as f:
        content = "".joing(f.readlines())
    for term in terms:
        content = re.sub(r'``({})``(?!.*\s*[~-]+)'.format(term), r':term:`\1`', content)

    with open(rst, 'w') as f:
        f.write(content)
"""

(From yocto-docs rev: ba49d9babfcb84bc5c26a68c8c3880a1d9c236d3)

Signed-off-by: Quentin Schulz <foss@0leil.net>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Reviewed-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Quentin Schulz
2021-05-27 20:41:17 +02:00
committed by Richard Purdie
parent 7a9b74e9d2
commit 7d3f57cfd2
38 changed files with 1087 additions and 1087 deletions
@@ -68,7 +68,7 @@ The following changes have been made that relate to BitBake:
- ``${``\ :term:`P`\ ``}`` and
``${``\ :term:`PF`\ ``}`` are no longer added to
:term:`PROVIDES` by default in ``bitbake.conf``.
These version-specific ``PROVIDES`` items were seldom used.
These version-specific :term:`PROVIDES` items were seldom used.
Attempting to use them could result in two versions being built
simultaneously rather than just one version due to the way BitBake
resolves dependencies.
@@ -84,9 +84,9 @@ The following changes have been made to the package QA checks:
:term:`WARN_QA` values in your configuration, check
that they contain all of the issues that you wish to be reported.
Previous Yocto Project versions contained a bug that meant that any
item not mentioned in ``ERROR_QA`` or ``WARN_QA`` would be treated as
item not mentioned in :term:`ERROR_QA` or :term:`WARN_QA` would be treated as
a warning. Consequently, several important items were not already in
the default value of ``WARN_QA``. All of the possible QA checks are
the default value of :term:`WARN_QA`. All of the possible QA checks are
now documented in the ":ref:`insane.bbclass <ref-classes-insane>`"
section.
@@ -97,7 +97,7 @@ The following changes have been made to the package QA checks:
- If you are using the ``buildhistory`` class, the check for the package
version going backwards is now controlled using a standard QA check.
Thus, if you have customized your ``ERROR_QA`` or ``WARN_QA`` values
Thus, if you have customized your :term:`ERROR_QA` or :term:`WARN_QA` values
and still wish to have this check performed, you should add
"version-going-backwards" to your value for one or the other
variables depending on how you wish it to be handled. See the
@@ -129,7 +129,7 @@ The following directory changes exist:
- When buildhistory is enabled, its output is now written under the
:term:`Build Directory` rather than
:term:`TMPDIR`. Doing so makes it easier to delete
``TMPDIR`` and preserve the build history. Additionally, data for
:term:`TMPDIR` and preserve the build history. Additionally, data for
produced SDKs is now split by :term:`IMAGE_NAME`.
- The ``pkgdata`` directory produced as part of the packaging process
@@ -157,20 +157,20 @@ major issue in the way the values are used.
The following changes have been made that relate to
:term:`IMAGE_FEATURES`:
- The value of ``IMAGE_FEATURES`` is now validated to ensure invalid
- The value of :term:`IMAGE_FEATURES` is now validated to ensure invalid
feature items are not added. Some users mistakenly add package names
to this variable instead of using
:term:`IMAGE_INSTALL` in order to have the
package added to the image, which does not work. This change is
intended to catch those kinds of situations. Valid ``IMAGE_FEATURES``
intended to catch those kinds of situations. Valid :term:`IMAGE_FEATURES`
are drawn from ``PACKAGE_GROUP`` definitions,
:term:`COMPLEMENTARY_GLOB` and a new
"validitems" varflag on ``IMAGE_FEATURES``. The "validitems" varflag
"validitems" varflag on :term:`IMAGE_FEATURES`. The "validitems" varflag
change allows additional features to be added if they are not
provided using the previous two mechanisms.
- The previously deprecated "apps-console-core" ``IMAGE_FEATURES`` item
is no longer supported. Add "splash" to ``IMAGE_FEATURES`` if you
- The previously deprecated "apps-console-core" :term:`IMAGE_FEATURES` item
is no longer supported. Add "splash" to :term:`IMAGE_FEATURES` if you
wish to have the splash screen enabled, since this is all that
apps-console-core was doing.
@@ -285,7 +285,7 @@ Following are changes to ``udev``:
``udev-extraconf`` to your image.
- ``udev`` no longer brings in ``pciutils-ids`` or ``usbutils-ids``
through ``RRECOMMENDS``. These are not needed by ``udev`` itself and
through :term:`RRECOMMENDS`. These are not needed by ``udev`` itself and
removing them saves around 350KB.
.. _migration-1.5-removed-renamed-recipes: