summaryrefslogtreecommitdiffstats
path: root/documentation/migration-guides
diff options
context:
space:
mode:
authorQuentin Schulz <foss@0leil.net>2021-06-19 09:07:35 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-16 21:59:31 +0100
commit5a6fb291ad16ce4110e65adf2d29e8ccfe6fa25a (patch)
treedf43222dc7a0def1bbc6246ca2a33953f85e584f /documentation/migration-guides
parentbe3e14dd43220db034a63b7a9f5516feb6a00110 (diff)
downloadpoky-5a6fb291ad16ce4110e65adf2d29e8ccfe6fa25a.tar.gz
docs: replace remaining ``FOO`` by :term:`FOO`
A few occurences appeared between the time the original patch was sent and it was applied, this fixes it. Also, the original patch didn't take into account lowercase terms, this is now fixed, see module_autoload for example. Finally, as is often the case with regexp, there was a typo in it that didn't make it match as much as it should have. The script that is used to do the replacement of ``FOO`` by :term:`FOO` is the following Python code: import re from pathlib import Path from runpy import run_module import contextlib import io import sys re_term = re.compile(r'variables.html#term-([a-zA-Z_0-9]*)') terms = [] new_terms = set() with contextlib.redirect_stdout(io.StringIO()) as f: run_module('sphinx.ext.intersphinx', run_name='__main__') objects = f.getvalue() match = re_term.search(objects) while match: if match.group(1): terms.append(match.group(1)) match = re_term.search(objects, match.end()) for rst in Path('.').rglob('*.rst'): with open(rst, 'r') as f: content = "".join(f.readlines()) for term in terms: content = re.sub(r'``({})``(?!.*\s+[~=-]{{{:d},}})'.format(term, len(term)), r':term:`\1`', content) with open(rst, 'w') as f: f.write(content) This script takes one argument as input: an objects.inv. Bitbake's can be gotten from https://docs.yoctoproject.org/bitbake/objects.inv. The objetcs.inv from the current git repo can be gotten from documentation/_build/html/objetcs.inv after running `make html`. Note that this excludes from replacement terms that appear in section titles as it requires refs to be changed too. This can be automated too if need be but right now it looks a bit confusing to have an anchor link (for sections) also have a term/reference link in it. I am not sure this is desired today. This is the result of two runs of the aforementioned script, once with Bitbake objects.inv and once with this repo's. Fixes: ba49d9babfcb "docs: replace ``FOO`` by :term:`FOO` where possible" (From yocto-docs rev: 1e1b0c4dd241b6657035172b1f7b5f341afa8b25) Signed-off-by: Quentin Schulz <foss@0leil.net> Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/migration-guides')
-rw-r--r--documentation/migration-guides/migration-1.5.rst4
-rw-r--r--documentation/migration-guides/migration-1.7.rst2
-rw-r--r--documentation/migration-guides/migration-2.1.rst4
-rw-r--r--documentation/migration-guides/migration-2.2.rst4
-rw-r--r--documentation/migration-guides/migration-2.3.rst2
-rw-r--r--documentation/migration-guides/migration-2.4.rst6
-rw-r--r--documentation/migration-guides/migration-2.5.rst4
-rw-r--r--documentation/migration-guides/migration-2.6.rst2
-rw-r--r--documentation/migration-guides/migration-2.7.rst2
-rw-r--r--documentation/migration-guides/migration-3.0.rst2
10 files changed, 16 insertions, 16 deletions
diff --git a/documentation/migration-guides/migration-1.5.rst b/documentation/migration-guides/migration-1.5.rst
index e956d9fffa..e1ba4a9a13 100644
--- a/documentation/migration-guides/migration-1.5.rst
+++ b/documentation/migration-guides/migration-1.5.rst
@@ -124,7 +124,7 @@ The following directory changes exist:
124 need to refer to this directory. The ``runqemu`` script now uses this 124 need to refer to this directory. The ``runqemu`` script now uses this
125 variable to find images and kernel binaries and will use BitBake to 125 variable to find images and kernel binaries and will use BitBake to
126 determine the directory. Alternatively, you can set the 126 determine the directory. Alternatively, you can set the
127 ``DEPLOY_DIR_IMAGE`` variable in the external environment. 127 :term:`DEPLOY_DIR_IMAGE` variable in the external environment.
128 128
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
@@ -333,7 +333,7 @@ Following is a list of short entries describing other changes:
333 :term:`BAD_RECOMMENDATIONS` supports 333 :term:`BAD_RECOMMENDATIONS` supports
334 pre-renamed package names. 334 pre-renamed package names.
335 335
336- ``classes/rootfs_rpm``: Implement ``BAD_RECOMMENDATIONS`` for RPM. 336- ``classes/rootfs_rpm``: Implement :term:`BAD_RECOMMENDATIONS` for RPM.
337 337
338- ``systemd``: Remove ``systemd_unitdir`` if ``systemd`` is not in 338- ``systemd``: Remove ``systemd_unitdir`` if ``systemd`` is not in
339 :term:`DISTRO_FEATURES`. 339 :term:`DISTRO_FEATURES`.
diff --git a/documentation/migration-guides/migration-1.7.rst b/documentation/migration-guides/migration-1.7.rst
index c3a50eec88..8c642da202 100644
--- a/documentation/migration-guides/migration-1.7.rst
+++ b/documentation/migration-guides/migration-1.7.rst
@@ -13,7 +13,7 @@ The QEMU recipe now uses a number of
13:term:`PACKAGECONFIG` options to enable various 13:term:`PACKAGECONFIG` options to enable various
14optional features. The method used to set defaults for these options 14optional features. The method used to set defaults for these options
15means that existing ``local.conf`` files will need to be modified to 15means that existing ``local.conf`` files will need to be modified to
16append to ``PACKAGECONFIG`` for ``qemu-native`` and ``nativesdk-qemu`` 16append to :term:`PACKAGECONFIG` for ``qemu-native`` and ``nativesdk-qemu``
17instead of setting it. In other words, to enable graphical output for 17instead of setting it. In other words, to enable graphical output for
18QEMU, you should now have these lines in ``local.conf``:: 18QEMU, you should now have these lines in ``local.conf``::
19 19
diff --git a/documentation/migration-guides/migration-2.1.rst b/documentation/migration-guides/migration-2.1.rst
index 6c5ed965dc..3135d69caa 100644
--- a/documentation/migration-guides/migration-2.1.rst
+++ b/documentation/migration-guides/migration-2.1.rst
@@ -62,12 +62,12 @@ Makefile Environment Changes
62---------------------------- 62----------------------------
63 63
64:term:`EXTRA_OEMAKE` now defaults to "" instead of 64:term:`EXTRA_OEMAKE` now defaults to "" instead of
65"-e MAKEFLAGS=". Setting ``EXTRA_OEMAKE`` to "-e MAKEFLAGS=" by default 65"-e MAKEFLAGS=". Setting :term:`EXTRA_OEMAKE` to "-e MAKEFLAGS=" by default
66was a historical accident that has required many classes (e.g. 66was a historical accident that has required many classes (e.g.
67``autotools``, ``module``) and recipes to override this default in order 67``autotools``, ``module``) and recipes to override this default in order
68to work with sensible build systems. When upgrading to the release, you 68to work with sensible build systems. When upgrading to the release, you
69must edit any recipe that relies upon this old default by either setting 69must edit any recipe that relies upon this old default by either setting
70``EXTRA_OEMAKE`` back to "-e MAKEFLAGS=" or by explicitly setting any 70:term:`EXTRA_OEMAKE` back to "-e MAKEFLAGS=" or by explicitly setting any
71required variable value overrides using :term:`EXTRA_OEMAKE`, which is 71required variable value overrides using :term:`EXTRA_OEMAKE`, which is
72typically only needed when a Makefile sets a default value for a 72typically only needed when a Makefile sets a default value for a
73variable that is inappropriate for cross-compilation using the "=" 73variable that is inappropriate for cross-compilation using the "="
diff --git a/documentation/migration-guides/migration-2.2.rst b/documentation/migration-guides/migration-2.2.rst
index d6dacdf34a..cbdc6a739e 100644
--- a/documentation/migration-guides/migration-2.2.rst
+++ b/documentation/migration-guides/migration-2.2.rst
@@ -271,7 +271,7 @@ update the references to ensure they continue to work.
271The :term:`IMGDEPLOYDIR` variable was introduced to allow sstate caching of 271The :term:`IMGDEPLOYDIR` variable was introduced to allow sstate caching of
272image creation results. Image recipes defining custom :term:`IMAGE_CMD` or 272image creation results. Image recipes defining custom :term:`IMAGE_CMD` or
273doing postprocessing on the generated images need to be adapted to use 273doing postprocessing on the generated images need to be adapted to use
274``IMGDEPLOYDIR`` instead of :term:`DEPLOY_DIR_IMAGE`. ``IMAGE_MANIFEST`` 274:term:`IMGDEPLOYDIR` instead of :term:`DEPLOY_DIR_IMAGE`. :term:`IMAGE_MANIFEST`
275creation and symlinking of the most recent image file will fail otherwise. 275creation and symlinking of the most recent image file will fail otherwise.
276 276
277.. _migration-2.2-bitbake-changes: 277.. _migration-2.2-bitbake-changes:
@@ -292,7 +292,7 @@ The following changes took place for BitBake:
292 change is more in-line with how the other fetchers work for source 292 change is more in-line with how the other fetchers work for source
293 control systems. Recipes that fetch from Perforce will need to be 293 control systems. Recipes that fetch from Perforce will need to be
294 updated to use :term:`SRCREV` in place of specifying the source revision 294 updated to use :term:`SRCREV` in place of specifying the source revision
295 within ``SRC_URI``. 295 within :term:`SRC_URI`.
296 296
297- Some of BitBake's internal code structures for accessing the recipe 297- Some of BitBake's internal code structures for accessing the recipe
298 cache needed to be changed to support the new multi-configuration 298 cache needed to be changed to support the new multi-configuration
diff --git a/documentation/migration-guides/migration-2.3.rst b/documentation/migration-guides/migration-2.3.rst
index 886d579f9b..b79bc541c5 100644
--- a/documentation/migration-guides/migration-2.3.rst
+++ b/documentation/migration-guides/migration-2.3.rst
@@ -36,7 +36,7 @@ Consider the following:
36 has a ``pkg_postinst`` that calls ``systemctl`` if "systemd" is in 36 has a ``pkg_postinst`` that calls ``systemctl`` if "systemd" is in
37 :term:`DISTRO_FEATURES`. In the example, 37 :term:`DISTRO_FEATURES`. In the example,
38 ``systemd-systemctl-native`` is added to :term:`PACKAGE_WRITE_DEPS`, 38 ``systemd-systemctl-native`` is added to :term:`PACKAGE_WRITE_DEPS`,
39 which is also conditional on "systemd" being in ``DISTRO_FEATURES``. 39 which is also conditional on "systemd" being in :term:`DISTRO_FEATURES`.
40 40
41- Examine Recipes that Use ``SSTATEPOSTINSTFUNCS``: You need to 41- Examine Recipes that Use ``SSTATEPOSTINSTFUNCS``: You need to
42 examine any recipe that uses ``SSTATEPOSTINSTFUNCS`` and determine 42 examine any recipe that uses ``SSTATEPOSTINSTFUNCS`` and determine
diff --git a/documentation/migration-guides/migration-2.4.rst b/documentation/migration-guides/migration-2.4.rst
index 07f2bef623..cab81356d8 100644
--- a/documentation/migration-guides/migration-2.4.rst
+++ b/documentation/migration-guides/migration-2.4.rst
@@ -51,7 +51,7 @@ occurred:
51 ``su`` is normally provided through the shadow file format. The 51 ``su`` is normally provided through the shadow file format. The
52 main ``util-linux`` package has runtime dependencies (i.e. 52 main ``util-linux`` package has runtime dependencies (i.e.
53 :term:`RDEPENDS`) on the ``util-linux-su`` package 53 :term:`RDEPENDS`) on the ``util-linux-su`` package
54 when "pam" is in ``DISTRO_FEATURES``. 54 when "pam" is in :term:`DISTRO_FEATURES`.
55 55
56 - The ``switch_root`` program is now packaged in a separate 56 - The ``switch_root`` program is now packaged in a separate
57 "util-linux-switch-root" package for small initramfs images that 57 "util-linux-switch-root" package for small initramfs images that
@@ -72,10 +72,10 @@ occurred:
72 change also eliminates needing to pull in the entire ``initscripts`` 72 change also eliminates needing to pull in the entire ``initscripts``
73 package. The main ``initscripts`` package has a runtime dependency 73 package. The main ``initscripts`` package has a runtime dependency
74 (i.e. :term:`RDEPENDS`) on the ``sushell`` package when "selinux" is in 74 (i.e. :term:`RDEPENDS`) on the ``sushell`` package when "selinux" is in
75 ``DISTRO_FEATURES``. 75 :term:`DISTRO_FEATURES`.
76 76
77- ``glib-2.0``: The ``glib-2.0`` package now has a recommended 77- ``glib-2.0``: The ``glib-2.0`` package now has a recommended
78 runtime dependency (i.e. ``RRECOMMENDS``) on the ``shared-mime-info`` 78 runtime dependency (i.e. :term:`RRECOMMENDS`) on the ``shared-mime-info``
79 package, since large portions of GIO are not useful without the MIME 79 package, since large portions of GIO are not useful without the MIME
80 database. You can remove the dependency by using the 80 database. You can remove the dependency by using the
81 :term:`BAD_RECOMMENDATIONS` variable if 81 :term:`BAD_RECOMMENDATIONS` variable if
diff --git a/documentation/migration-guides/migration-2.5.rst b/documentation/migration-guides/migration-2.5.rst
index d14580df21..79f804fa1d 100644
--- a/documentation/migration-guides/migration-2.5.rst
+++ b/documentation/migration-guides/migration-2.5.rst
@@ -278,12 +278,12 @@ The following are additional changes:
278 performance and compression. In order to build a live image with 278 performance and compression. In order to build a live image with
279 squashfs+lz4 compression enabled you should now set 279 squashfs+lz4 compression enabled you should now set
280 ``LIVE_ROOTFS_TYPE = "squashfs-lz4"`` and ensure that ``live`` is in 280 ``LIVE_ROOTFS_TYPE = "squashfs-lz4"`` and ensure that ``live`` is in
281 ``IMAGE_FSTYPES``. 281 :term:`IMAGE_FSTYPES`.
282 282
283- Recipes with an unconditional dependency on ``libpam`` are only 283- Recipes with an unconditional dependency on ``libpam`` are only
284 buildable with ``pam`` in :term:`DISTRO_FEATURES`. If the dependency is 284 buildable with ``pam`` in :term:`DISTRO_FEATURES`. If the dependency is
285 truly optional then it is recommended that the dependency be 285 truly optional then it is recommended that the dependency be
286 conditional upon ``pam`` being in ``DISTRO_FEATURES``. 286 conditional upon ``pam`` being in :term:`DISTRO_FEATURES`.
287 287
288- For EFI-based machines, the bootloader (``grub-efi`` by default) is 288- For EFI-based machines, the bootloader (``grub-efi`` by default) is
289 installed into the image at /boot. Wic can be used to split the 289 installed into the image at /boot. Wic can be used to split the
diff --git a/documentation/migration-guides/migration-2.6.rst b/documentation/migration-guides/migration-2.6.rst
index 3216ed5ae3..a8c56ede72 100644
--- a/documentation/migration-guides/migration-2.6.rst
+++ b/documentation/migration-guides/migration-2.6.rst
@@ -430,7 +430,7 @@ The following miscellaneous changes occurred:
430 .. note:: 430 .. note::
431 431
432 ``genericx86`` and ``genericx86-64`` retain ``kernel-modules`` as part of 432 ``genericx86`` and ``genericx86-64`` retain ``kernel-modules`` as part of
433 the ``RRECOMMENDS`` variable setting. 433 the :term:`RRECOMMENDS` variable setting.
434 434
435- The ``LGPLv2_WHITELIST_GPL-3.0`` variable has been removed. If you 435- The ``LGPLv2_WHITELIST_GPL-3.0`` variable has been removed. If you
436 are setting this variable in your configuration, set or append it to 436 are setting this variable in your configuration, set or append it to
diff --git a/documentation/migration-guides/migration-2.7.rst b/documentation/migration-guides/migration-2.7.rst
index 25d92296cc..69bd390603 100644
--- a/documentation/migration-guides/migration-2.7.rst
+++ b/documentation/migration-guides/migration-2.7.rst
@@ -72,7 +72,7 @@ License Value Corrections
72The following corrections have been made to the 72The following corrections have been made to the
73:term:`LICENSE` values set by recipes: 73:term:`LICENSE` values set by recipes:
74 74
75- *socat*: Corrected ``LICENSE`` to be "GPLv2" rather than "GPLv2+". 75- *socat*: Corrected :term:`LICENSE` to be "GPLv2" rather than "GPLv2+".
76- *libgfortran*: Set license to "GPL-3.0-with-GCC-exception". 76- *libgfortran*: Set license to "GPL-3.0-with-GCC-exception".
77- *elfutils*: Removed "Elfutils-Exception" and set to "GPLv2" for shared libraries 77- *elfutils*: Removed "Elfutils-Exception" and set to "GPLv2" for shared libraries
78 78
diff --git a/documentation/migration-guides/migration-3.0.rst b/documentation/migration-guides/migration-3.0.rst
index 163c6201c5..20c7026e8d 100644
--- a/documentation/migration-guides/migration-3.0.rst
+++ b/documentation/migration-guides/migration-3.0.rst
@@ -243,7 +243,7 @@ The following sanity check changes occurred.
243- Setting ``DEPENDS_${PN}`` anywhere (i.e. typically in a recipe) now 243- Setting ``DEPENDS_${PN}`` anywhere (i.e. typically in a recipe) now
244 triggers an error. The error is triggered because 244 triggers an error. The error is triggered because
245 :term:`DEPENDS` is not a package-specific variable 245 :term:`DEPENDS` is not a package-specific variable
246 unlike RDEPENDS. You should set ``DEPENDS`` instead. 246 unlike RDEPENDS. You should set :term:`DEPENDS` instead.
247 247
248- systemd currently does not work well with the musl C library because 248- systemd currently does not work well with the musl C library because
249 only upstream officially supports linking the library with glibc. 249 only upstream officially supports linking the library with glibc.