1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 12:49: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
@@ -156,11 +156,11 @@ Image/Kernel Artifact Naming Changes
The following changes have been made:
- Name variables (e.g. :term:`IMAGE_NAME`) use a new
``IMAGE_VERSION_SUFFIX`` variable instead of
:term:`DATETIME`. Using ``IMAGE_VERSION_SUFFIX``
:term:`IMAGE_VERSION_SUFFIX` variable instead of
:term:`DATETIME`. Using :term:`IMAGE_VERSION_SUFFIX`
allows easier and more direct changes.
The ``IMAGE_VERSION_SUFFIX`` variable is set in the ``bitbake.conf``
The :term:`IMAGE_VERSION_SUFFIX` variable is set in the ``bitbake.conf``
configuration file as follows::
IMAGE_VERSION_SUFFIX = "-${DATETIME}"
@@ -212,19 +212,19 @@ The following changes have been made:
The :term:`SERIAL_CONSOLE` variable has been
functionally replaced by the
:term:`SERIAL_CONSOLES` variable for some time.
With the Yocto Project 2.6 release, ``SERIAL_CONSOLE`` has been
With the Yocto Project 2.6 release, :term:`SERIAL_CONSOLE` has been
officially deprecated.
``SERIAL_CONSOLE`` will continue to work as before for the 2.6 release.
:term:`SERIAL_CONSOLE` will continue to work as before for the 2.6 release.
However, for the sake of future compatibility, it is recommended that
you replace all instances of ``SERIAL_CONSOLE`` with
``SERIAL_CONSOLES``.
you replace all instances of :term:`SERIAL_CONSOLE` with
:term:`SERIAL_CONSOLES`.
.. note::
The only difference in usage is that ``SERIAL_CONSOLES``
The only difference in usage is that :term:`SERIAL_CONSOLES`
expects entries to be separated using semicolons as compared to
``SERIAL_CONSOLE``, which expects spaces.
:term:`SERIAL_CONSOLE`, which expects spaces.
.. _migration-2.6-poky-sets-unknown-configure-option-to-qa-error:
@@ -387,14 +387,14 @@ QEMU (i.e. "qemu-usermode" is in
default).
If you wish to disable Python profile-guided optimization regardless of
the value of ``MACHINE_FEATURES``, then ensure that
the value of :term:`MACHINE_FEATURES`, then ensure that
:term:`PACKAGECONFIG` for the ``python3`` recipe
does not contain "pgo". You could accomplish the latter using the
following at the configuration level::
PACKAGECONFIG_remove_pn-python3 = "pgo"
Alternatively, you can set ``PACKAGECONFIG`` using an append file
Alternatively, you can set :term:`PACKAGECONFIG` using an append file
for the ``python3`` recipe.
.. _migration-2.6-miscellaneous-changes: