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-2.6.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-2.6.rst')
-rw-r--r-- | documentation/migration-guides/migration-2.6.rst | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/documentation/migration-guides/migration-2.6.rst b/documentation/migration-guides/migration-2.6.rst index e27fad82c6..3216ed5ae3 100644 --- a/documentation/migration-guides/migration-2.6.rst +++ b/documentation/migration-guides/migration-2.6.rst | |||
@@ -156,11 +156,11 @@ Image/Kernel Artifact Naming Changes | |||
156 | The following changes have been made: | 156 | The following changes have been made: |
157 | 157 | ||
158 | - Name variables (e.g. :term:`IMAGE_NAME`) use a new | 158 | - Name variables (e.g. :term:`IMAGE_NAME`) use a new |
159 | ``IMAGE_VERSION_SUFFIX`` variable instead of | 159 | :term:`IMAGE_VERSION_SUFFIX` variable instead of |
160 | :term:`DATETIME`. Using ``IMAGE_VERSION_SUFFIX`` | 160 | :term:`DATETIME`. Using :term:`IMAGE_VERSION_SUFFIX` |
161 | allows easier and more direct changes. | 161 | allows easier and more direct changes. |
162 | 162 | ||
163 | The ``IMAGE_VERSION_SUFFIX`` variable is set in the ``bitbake.conf`` | 163 | The :term:`IMAGE_VERSION_SUFFIX` variable is set in the ``bitbake.conf`` |
164 | configuration file as follows:: | 164 | configuration file as follows:: |
165 | 165 | ||
166 | IMAGE_VERSION_SUFFIX = "-${DATETIME}" | 166 | IMAGE_VERSION_SUFFIX = "-${DATETIME}" |
@@ -212,19 +212,19 @@ The following changes have been made: | |||
212 | The :term:`SERIAL_CONSOLE` variable has been | 212 | The :term:`SERIAL_CONSOLE` variable has been |
213 | functionally replaced by the | 213 | functionally replaced by the |
214 | :term:`SERIAL_CONSOLES` variable for some time. | 214 | :term:`SERIAL_CONSOLES` variable for some time. |
215 | With the Yocto Project 2.6 release, ``SERIAL_CONSOLE`` has been | 215 | With the Yocto Project 2.6 release, :term:`SERIAL_CONSOLE` has been |
216 | officially deprecated. | 216 | officially deprecated. |
217 | 217 | ||
218 | ``SERIAL_CONSOLE`` will continue to work as before for the 2.6 release. | 218 | :term:`SERIAL_CONSOLE` will continue to work as before for the 2.6 release. |
219 | However, for the sake of future compatibility, it is recommended that | 219 | However, for the sake of future compatibility, it is recommended that |
220 | you replace all instances of ``SERIAL_CONSOLE`` with | 220 | you replace all instances of :term:`SERIAL_CONSOLE` with |
221 | ``SERIAL_CONSOLES``. | 221 | :term:`SERIAL_CONSOLES`. |
222 | 222 | ||
223 | .. note:: | 223 | .. note:: |
224 | 224 | ||
225 | The only difference in usage is that ``SERIAL_CONSOLES`` | 225 | The only difference in usage is that :term:`SERIAL_CONSOLES` |
226 | expects entries to be separated using semicolons as compared to | 226 | expects entries to be separated using semicolons as compared to |
227 | ``SERIAL_CONSOLE``, which expects spaces. | 227 | :term:`SERIAL_CONSOLE`, which expects spaces. |
228 | 228 | ||
229 | .. _migration-2.6-poky-sets-unknown-configure-option-to-qa-error: | 229 | .. _migration-2.6-poky-sets-unknown-configure-option-to-qa-error: |
230 | 230 | ||
@@ -387,14 +387,14 @@ QEMU (i.e. "qemu-usermode" is in | |||
387 | default). | 387 | default). |
388 | 388 | ||
389 | If you wish to disable Python profile-guided optimization regardless of | 389 | If you wish to disable Python profile-guided optimization regardless of |
390 | the value of ``MACHINE_FEATURES``, then ensure that | 390 | the value of :term:`MACHINE_FEATURES`, then ensure that |
391 | :term:`PACKAGECONFIG` for the ``python3`` recipe | 391 | :term:`PACKAGECONFIG` for the ``python3`` recipe |
392 | does not contain "pgo". You could accomplish the latter using the | 392 | does not contain "pgo". You could accomplish the latter using the |
393 | following at the configuration level:: | 393 | following at the configuration level:: |
394 | 394 | ||
395 | PACKAGECONFIG_remove_pn-python3 = "pgo" | 395 | PACKAGECONFIG_remove_pn-python3 = "pgo" |
396 | 396 | ||
397 | Alternatively, you can set ``PACKAGECONFIG`` using an append file | 397 | Alternatively, you can set :term:`PACKAGECONFIG` using an append file |
398 | for the ``python3`` recipe. | 398 | for the ``python3`` recipe. |
399 | 399 | ||
400 | .. _migration-2.6-miscellaneous-changes: | 400 | .. _migration-2.6-miscellaneous-changes: |