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/migration-guides/migration-1.5.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/migration-guides/migration-1.5.rst')
-rw-r--r-- | documentation/migration-guides/migration-1.5.rst | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/documentation/migration-guides/migration-1.5.rst b/documentation/migration-guides/migration-1.5.rst index f6bd118c9d..e956d9fffa 100644 --- a/documentation/migration-guides/migration-1.5.rst +++ b/documentation/migration-guides/migration-1.5.rst | |||
@@ -68,7 +68,7 @@ The following changes have been made that relate to BitBake: | |||
68 | - ``${``\ :term:`P`\ ``}`` and | 68 | - ``${``\ :term:`P`\ ``}`` and |
69 | ``${``\ :term:`PF`\ ``}`` are no longer added to | 69 | ``${``\ :term:`PF`\ ``}`` are no longer added to |
70 | :term:`PROVIDES` by default in ``bitbake.conf``. | 70 | :term:`PROVIDES` by default in ``bitbake.conf``. |
71 | These version-specific ``PROVIDES`` items were seldom used. | 71 | These version-specific :term:`PROVIDES` items were seldom used. |
72 | Attempting to use them could result in two versions being built | 72 | Attempting to use them could result in two versions being built |
73 | simultaneously rather than just one version due to the way BitBake | 73 | simultaneously rather than just one version due to the way BitBake |
74 | resolves dependencies. | 74 | resolves dependencies. |
@@ -84,9 +84,9 @@ The following changes have been made to the package QA checks: | |||
84 | :term:`WARN_QA` values in your configuration, check | 84 | :term:`WARN_QA` values in your configuration, check |
85 | that they contain all of the issues that you wish to be reported. | 85 | that they contain all of the issues that you wish to be reported. |
86 | Previous Yocto Project versions contained a bug that meant that any | 86 | Previous Yocto Project versions contained a bug that meant that any |
87 | item not mentioned in ``ERROR_QA`` or ``WARN_QA`` would be treated as | 87 | item not mentioned in :term:`ERROR_QA` or :term:`WARN_QA` would be treated as |
88 | a warning. Consequently, several important items were not already in | 88 | a warning. Consequently, several important items were not already in |
89 | the default value of ``WARN_QA``. All of the possible QA checks are | 89 | the default value of :term:`WARN_QA`. All of the possible QA checks are |
90 | now documented in the ":ref:`insane.bbclass <ref-classes-insane>`" | 90 | now documented in the ":ref:`insane.bbclass <ref-classes-insane>`" |
91 | section. | 91 | section. |
92 | 92 | ||
@@ -97,7 +97,7 @@ The following changes have been made to the package QA checks: | |||
97 | 97 | ||
98 | - If you are using the ``buildhistory`` class, the check for the package | 98 | - If you are using the ``buildhistory`` class, the check for the package |
99 | version going backwards is now controlled using a standard QA check. | 99 | version going backwards is now controlled using a standard QA check. |
100 | Thus, if you have customized your ``ERROR_QA`` or ``WARN_QA`` values | 100 | Thus, if you have customized your :term:`ERROR_QA` or :term:`WARN_QA` values |
101 | and still wish to have this check performed, you should add | 101 | and still wish to have this check performed, you should add |
102 | "version-going-backwards" to your value for one or the other | 102 | "version-going-backwards" to your value for one or the other |
103 | variables depending on how you wish it to be handled. See the | 103 | variables depending on how you wish it to be handled. See the |
@@ -129,7 +129,7 @@ The following directory changes exist: | |||
129 | - When buildhistory is enabled, its output is now written under the | 129 | - When buildhistory is enabled, its output is now written under the |
130 | :term:`Build Directory` rather than | 130 | :term:`Build Directory` rather than |
131 | :term:`TMPDIR`. Doing so makes it easier to delete | 131 | :term:`TMPDIR`. Doing so makes it easier to delete |
132 | ``TMPDIR`` and preserve the build history. Additionally, data for | 132 | :term:`TMPDIR` and preserve the build history. Additionally, data for |
133 | produced SDKs is now split by :term:`IMAGE_NAME`. | 133 | produced SDKs is now split by :term:`IMAGE_NAME`. |
134 | 134 | ||
135 | - The ``pkgdata`` directory produced as part of the packaging process | 135 | - The ``pkgdata`` directory produced as part of the packaging process |
@@ -157,20 +157,20 @@ major issue in the way the values are used. | |||
157 | The following changes have been made that relate to | 157 | The following changes have been made that relate to |
158 | :term:`IMAGE_FEATURES`: | 158 | :term:`IMAGE_FEATURES`: |
159 | 159 | ||
160 | - The value of ``IMAGE_FEATURES`` is now validated to ensure invalid | 160 | - The value of :term:`IMAGE_FEATURES` is now validated to ensure invalid |
161 | feature items are not added. Some users mistakenly add package names | 161 | feature items are not added. Some users mistakenly add package names |
162 | to this variable instead of using | 162 | to this variable instead of using |
163 | :term:`IMAGE_INSTALL` in order to have the | 163 | :term:`IMAGE_INSTALL` in order to have the |
164 | package added to the image, which does not work. This change is | 164 | package added to the image, which does not work. This change is |
165 | intended to catch those kinds of situations. Valid ``IMAGE_FEATURES`` | 165 | intended to catch those kinds of situations. Valid :term:`IMAGE_FEATURES` |
166 | are drawn from ``PACKAGE_GROUP`` definitions, | 166 | are drawn from ``PACKAGE_GROUP`` definitions, |
167 | :term:`COMPLEMENTARY_GLOB` and a new | 167 | :term:`COMPLEMENTARY_GLOB` and a new |
168 | "validitems" varflag on ``IMAGE_FEATURES``. The "validitems" varflag | 168 | "validitems" varflag on :term:`IMAGE_FEATURES`. The "validitems" varflag |
169 | change allows additional features to be added if they are not | 169 | change allows additional features to be added if they are not |
170 | provided using the previous two mechanisms. | 170 | provided using the previous two mechanisms. |
171 | 171 | ||
172 | - The previously deprecated "apps-console-core" ``IMAGE_FEATURES`` item | 172 | - The previously deprecated "apps-console-core" :term:`IMAGE_FEATURES` item |
173 | is no longer supported. Add "splash" to ``IMAGE_FEATURES`` if you | 173 | is no longer supported. Add "splash" to :term:`IMAGE_FEATURES` if you |
174 | wish to have the splash screen enabled, since this is all that | 174 | wish to have the splash screen enabled, since this is all that |
175 | apps-console-core was doing. | 175 | apps-console-core was doing. |
176 | 176 | ||
@@ -285,7 +285,7 @@ Following are changes to ``udev``: | |||
285 | ``udev-extraconf`` to your image. | 285 | ``udev-extraconf`` to your image. |
286 | 286 | ||
287 | - ``udev`` no longer brings in ``pciutils-ids`` or ``usbutils-ids`` | 287 | - ``udev`` no longer brings in ``pciutils-ids`` or ``usbutils-ids`` |
288 | through ``RRECOMMENDS``. These are not needed by ``udev`` itself and | 288 | through :term:`RRECOMMENDS`. These are not needed by ``udev`` itself and |
289 | removing them saves around 350KB. | 289 | removing them saves around 350KB. |
290 | 290 | ||
291 | .. _migration-1.5-removed-renamed-recipes: | 291 | .. _migration-1.5-removed-renamed-recipes: |