mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +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:
committed by
Richard Purdie
parent
7a9b74e9d2
commit
7d3f57cfd2
@@ -28,8 +28,8 @@ characters. This practice is now a requirement as BitBake's datastore
|
||||
now assumes lower-case characters in order to give a slight performance
|
||||
boost during parsing. In practical terms, this requirement means that
|
||||
anything that ends up in :term:`OVERRIDES` must now
|
||||
appear in lower-case characters (e.g. values for ``MACHINE``,
|
||||
``TARGET_ARCH``, ``DISTRO``, and also recipe names if
|
||||
appear in lower-case characters (e.g. values for :term:`MACHINE`,
|
||||
:term:`TARGET_ARCH`, :term:`DISTRO`, and also recipe names if
|
||||
``_pn-``\ recipename overrides are to be effective).
|
||||
|
||||
.. _migration-2.1-expand-parameter-to-getvar-and-getvarflag-now-mandatory:
|
||||
@@ -68,7 +68,7 @@ was a historical accident that has required many classes (e.g.
|
||||
to work with sensible build systems. When upgrading to the release, you
|
||||
must edit any recipe that relies upon this old default by either setting
|
||||
``EXTRA_OEMAKE`` back to "-e MAKEFLAGS=" or by explicitly setting any
|
||||
required variable value overrides using ``EXTRA_OEMAKE``, which is
|
||||
required variable value overrides using :term:`EXTRA_OEMAKE`, which is
|
||||
typically only needed when a Makefile sets a default value for a
|
||||
variable that is inappropriate for cross-compilation using the "="
|
||||
operator rather than the "?=" operator.
|
||||
@@ -376,7 +376,7 @@ These additional changes exist:
|
||||
run-postinsts
|
||||
|
||||
With the Yocto Project 2.1 release, these packages are
|
||||
only removed if "read-only-rootfs" is in ``IMAGE_FEATURES``, since
|
||||
only removed if "read-only-rootfs" is in :term:`IMAGE_FEATURES`, since
|
||||
they might still be needed for a read-write image even in the absence
|
||||
of a package manager (e.g. if users need to be added, modified, or
|
||||
removed at runtime).
|
||||
|
||||
Reference in New Issue
Block a user