diff options
author | Quentin Schulz <foss@0leil.net> | 2021-05-27 20:41:17 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-06-19 16:54:01 +0100 |
commit | 7d3f57cfd2e4322bcd96d67d330124f221a9aedd (patch) | |
tree | 5d07321b7c8bc59bb7fcc0372fab8b7a1966cf06 /documentation/ref-manual/features.rst | |
parent | 7a9b74e9d2a5cf3b1fb3ac7565c50eae6e0d4632 (diff) | |
download | poky-7d3f57cfd2e4322bcd96d67d330124f221a9aedd.tar.gz |
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>
Diffstat (limited to 'documentation/ref-manual/features.rst')
-rw-r--r-- | documentation/ref-manual/features.rst | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/documentation/ref-manual/features.rst b/documentation/ref-manual/features.rst index 31d24b8c28..ded653221c 100644 --- a/documentation/ref-manual/features.rst +++ b/documentation/ref-manual/features.rst | |||
@@ -10,10 +10,10 @@ can select, and a reference on feature backfilling. | |||
10 | 10 | ||
11 | Features provide a mechanism for working out which packages should be | 11 | Features provide a mechanism for working out which packages should be |
12 | included in the generated images. Distributions can select which | 12 | included in the generated images. Distributions can select which |
13 | features they want to support through the ``DISTRO_FEATURES`` variable, | 13 | features they want to support through the :term:`DISTRO_FEATURES` variable, |
14 | which is set or appended to in a distribution's configuration file such | 14 | which is set or appended to in a distribution's configuration file such |
15 | as ``poky.conf``, ``poky-tiny.conf``, ``poky-lsb.conf`` and so forth. | 15 | as ``poky.conf``, ``poky-tiny.conf``, ``poky-lsb.conf`` and so forth. |
16 | Machine features are set in the ``MACHINE_FEATURES`` variable, which is | 16 | Machine features are set in the :term:`MACHINE_FEATURES` variable, which is |
17 | set in the machine configuration file and specifies the hardware | 17 | set in the machine configuration file and specifies the hardware |
18 | features for a given machine. | 18 | features for a given machine. |
19 | 19 | ||
@@ -267,7 +267,7 @@ these valid features is as follows: | |||
267 | - *ssh-server-openssh:* Installs the OpenSSH SSH server, which is more | 267 | - *ssh-server-openssh:* Installs the OpenSSH SSH server, which is more |
268 | full-featured than Dropbear. Note that if both the OpenSSH SSH server | 268 | full-featured than Dropbear. Note that if both the OpenSSH SSH server |
269 | and the Dropbear minimal SSH server are present in | 269 | and the Dropbear minimal SSH server are present in |
270 | ``IMAGE_FEATURES``, then OpenSSH will take precedence and Dropbear | 270 | :term:`IMAGE_FEATURES`, then OpenSSH will take precedence and Dropbear |
271 | will not be installed. | 271 | will not be installed. |
272 | 272 | ||
273 | - *tools-debug:* Installs debugging tools such as ``strace`` and | 273 | - *tools-debug:* Installs debugging tools such as ``strace`` and |
@@ -323,27 +323,27 @@ Here are two examples to help illustrate feature backfilling: | |||
323 | - *The "pulseaudio" distro feature option*: Previously, PulseAudio | 323 | - *The "pulseaudio" distro feature option*: Previously, PulseAudio |
324 | support was enabled within the Qt and GStreamer frameworks. Because | 324 | support was enabled within the Qt and GStreamer frameworks. Because |
325 | of this, the feature is backfilled and thus enabled for all distros | 325 | of this, the feature is backfilled and thus enabled for all distros |
326 | through the ``DISTRO_FEATURES_BACKFILL`` variable in the | 326 | through the :term:`DISTRO_FEATURES_BACKFILL` variable in the |
327 | ``meta/conf/bitbake.conf`` file. However, your distro needs to | 327 | ``meta/conf/bitbake.conf`` file. However, your distro needs to |
328 | disable the feature. You can disable the feature without affecting | 328 | disable the feature. You can disable the feature without affecting |
329 | other existing distro configurations that need PulseAudio support by | 329 | other existing distro configurations that need PulseAudio support by |
330 | adding "pulseaudio" to ``DISTRO_FEATURES_BACKFILL_CONSIDERED`` in | 330 | adding "pulseaudio" to :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` in |
331 | your distro's ``.conf`` file. Adding the feature to this variable | 331 | your distro's ``.conf`` file. Adding the feature to this variable |
332 | when it also exists in the ``DISTRO_FEATURES_BACKFILL`` variable | 332 | when it also exists in the :term:`DISTRO_FEATURES_BACKFILL` variable |
333 | prevents the build system from adding the feature to your | 333 | prevents the build system from adding the feature to your |
334 | configuration's ``DISTRO_FEATURES``, effectively disabling the | 334 | configuration's :term:`DISTRO_FEATURES`, effectively disabling the |
335 | feature for that particular distro. | 335 | feature for that particular distro. |
336 | 336 | ||
337 | - *The "rtc" machine feature option*: Previously, real time clock (RTC) | 337 | - *The "rtc" machine feature option*: Previously, real time clock (RTC) |
338 | support was enabled for all target devices. Because of this, the | 338 | support was enabled for all target devices. Because of this, the |
339 | feature is backfilled and thus enabled for all machines through the | 339 | feature is backfilled and thus enabled for all machines through the |
340 | ``MACHINE_FEATURES_BACKFILL`` variable in the | 340 | :term:`MACHINE_FEATURES_BACKFILL` variable in the |
341 | ``meta/conf/bitbake.conf`` file. However, your target device does not | 341 | ``meta/conf/bitbake.conf`` file. However, your target device does not |
342 | have this capability. You can disable RTC support for your device | 342 | have this capability. You can disable RTC support for your device |
343 | without affecting other machines that need RTC support by adding the | 343 | without affecting other machines that need RTC support by adding the |
344 | feature to your machine's ``MACHINE_FEATURES_BACKFILL_CONSIDERED`` | 344 | feature to your machine's :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` |
345 | list in the machine's ``.conf`` file. Adding the feature to this | 345 | list in the machine's ``.conf`` file. Adding the feature to this |
346 | variable when it also exists in the ``MACHINE_FEATURES_BACKFILL`` | 346 | variable when it also exists in the :term:`MACHINE_FEATURES_BACKFILL` |
347 | variable prevents the build system from adding the feature to your | 347 | variable prevents the build system from adding the feature to your |
348 | configuration's ``MACHINE_FEATURES``, effectively disabling RTC | 348 | configuration's :term:`MACHINE_FEATURES`, effectively disabling RTC |
349 | support for that particular machine. | 349 | support for that particular machine. |