mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 18:32:15 +02: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:
committed by
Richard Purdie
parent
7a9b74e9d2
commit
7d3f57cfd2
@@ -10,10 +10,10 @@ can select, and a reference on feature backfilling.
|
||||
|
||||
Features provide a mechanism for working out which packages should be
|
||||
included in the generated images. Distributions can select which
|
||||
features they want to support through the ``DISTRO_FEATURES`` variable,
|
||||
features they want to support through the :term:`DISTRO_FEATURES` variable,
|
||||
which is set or appended to in a distribution's configuration file such
|
||||
as ``poky.conf``, ``poky-tiny.conf``, ``poky-lsb.conf`` and so forth.
|
||||
Machine features are set in the ``MACHINE_FEATURES`` variable, which is
|
||||
Machine features are set in the :term:`MACHINE_FEATURES` variable, which is
|
||||
set in the machine configuration file and specifies the hardware
|
||||
features for a given machine.
|
||||
|
||||
@@ -267,7 +267,7 @@ these valid features is as follows:
|
||||
- *ssh-server-openssh:* Installs the OpenSSH SSH server, which is more
|
||||
full-featured than Dropbear. Note that if both the OpenSSH SSH server
|
||||
and the Dropbear minimal SSH server are present in
|
||||
``IMAGE_FEATURES``, then OpenSSH will take precedence and Dropbear
|
||||
:term:`IMAGE_FEATURES`, then OpenSSH will take precedence and Dropbear
|
||||
will not be installed.
|
||||
|
||||
- *tools-debug:* Installs debugging tools such as ``strace`` and
|
||||
@@ -323,27 +323,27 @@ Here are two examples to help illustrate feature backfilling:
|
||||
- *The "pulseaudio" distro feature option*: Previously, PulseAudio
|
||||
support was enabled within the Qt and GStreamer frameworks. Because
|
||||
of this, the feature is backfilled and thus enabled for all distros
|
||||
through the ``DISTRO_FEATURES_BACKFILL`` variable in the
|
||||
through the :term:`DISTRO_FEATURES_BACKFILL` variable in the
|
||||
``meta/conf/bitbake.conf`` file. However, your distro needs to
|
||||
disable the feature. You can disable the feature without affecting
|
||||
other existing distro configurations that need PulseAudio support by
|
||||
adding "pulseaudio" to ``DISTRO_FEATURES_BACKFILL_CONSIDERED`` in
|
||||
adding "pulseaudio" to :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` in
|
||||
your distro's ``.conf`` file. Adding the feature to this variable
|
||||
when it also exists in the ``DISTRO_FEATURES_BACKFILL`` variable
|
||||
when it also exists in the :term:`DISTRO_FEATURES_BACKFILL` variable
|
||||
prevents the build system from adding the feature to your
|
||||
configuration's ``DISTRO_FEATURES``, effectively disabling the
|
||||
configuration's :term:`DISTRO_FEATURES`, effectively disabling the
|
||||
feature for that particular distro.
|
||||
|
||||
- *The "rtc" machine feature option*: Previously, real time clock (RTC)
|
||||
support was enabled for all target devices. Because of this, the
|
||||
feature is backfilled and thus enabled for all machines through the
|
||||
``MACHINE_FEATURES_BACKFILL`` variable in the
|
||||
:term:`MACHINE_FEATURES_BACKFILL` variable in the
|
||||
``meta/conf/bitbake.conf`` file. However, your target device does not
|
||||
have this capability. You can disable RTC support for your device
|
||||
without affecting other machines that need RTC support by adding the
|
||||
feature to your machine's ``MACHINE_FEATURES_BACKFILL_CONSIDERED``
|
||||
feature to your machine's :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`
|
||||
list in the machine's ``.conf`` file. Adding the feature to this
|
||||
variable when it also exists in the ``MACHINE_FEATURES_BACKFILL``
|
||||
variable when it also exists in the :term:`MACHINE_FEATURES_BACKFILL`
|
||||
variable prevents the build system from adding the feature to your
|
||||
configuration's ``MACHINE_FEATURES``, effectively disabling RTC
|
||||
configuration's :term:`MACHINE_FEATURES`, effectively disabling RTC
|
||||
support for that particular machine.
|
||||
|
||||
Reference in New Issue
Block a user