Skip to contentSkip to conversation

Add further class references

PATCH New Michael Opdenacker 1 participant 4 messages Nov 23, 2021

lore
Share & tools
lore
#0 lore raw

cover Add further class references

These patches add missing references to the reference descriptions of classes.

Such references will also be useful to detect obsolete references to classes that have been removed.

As the code contains multiple references to the paths or contents of .bbclass files, I also plan to create a new "extlinks" macro to have hyperlinks to the corresponding code.

Michael Opdenacker (3):
migration-guides: add more class references
ref-manual: add more class references
misc manuals: add further class references

 documentation/dev-manual/common-tasks.rst     | 32 ++++++-------
 .../migration-guides/migration-1.5.rst        |  3 +-
 .../migration-guides/migration-1.7.rst        |  6 ++-
 .../migration-guides/migration-2.1.rst        |  6 +--
 .../migration-guides/migration-2.2.rst        |  2 +-
 .../migration-guides/migration-2.3.rst        |  2 +-
 .../migration-guides/migration-2.4.rst        |  2 +-
 .../migration-guides/migration-2.5.rst        |  8 ++--
 .../migration-guides/migration-3.0.rst        |  4 +-
 .../migration-guides/migration-3.1.rst        |  4 +-
 .../migration-guides/migration-3.2.rst        |  2 +-
 .../migration-guides/migration-3.3.rst        |  2 +-
 documentation/overview-manual/concepts.rst    |  2 +-
 documentation/ref-manual/classes.rst          |  4 +-
 documentation/ref-manual/structure.rst        |  2 +-
 documentation/ref-manual/tasks.rst            |  4 +-
 documentation/ref-manual/variables.rst        | 48 +++++++++----------
 documentation/test-manual/intro.rst           |  2 +-
 18 files changed, 67 insertions(+), 68 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/3 migration-guides: add more class references

---
 documentation/migration-guides/migration-1.5.rst | 3 ++-
 documentation/migration-guides/migration-1.7.rst | 6 ++++--
 documentation/migration-guides/migration-2.1.rst | 6 +++---
 documentation/migration-guides/migration-2.2.rst | 2 +-
 documentation/migration-guides/migration-2.3.rst | 2 +-
 documentation/migration-guides/migration-2.4.rst | 2 +-
 documentation/migration-guides/migration-2.5.rst | 8 ++++----
 documentation/migration-guides/migration-3.0.rst | 4 ++--
 documentation/migration-guides/migration-3.1.rst | 4 ++--
 documentation/migration-guides/migration-3.2.rst | 2 +-
 documentation/migration-guides/migration-3.3.rst | 2 +-
 11 files changed, 22 insertions(+), 19 deletions(-)
documentation/migration-guides/migration-1.5.rst +2 -1
index 11c821265c..15b0b43092 100644
@@ -95,7 +95,8 @@ The following changes have been made to the package QA checks:
    this file within :ref:`ref-tasks-install` if "make
    install" is installing it.
 
--  If you are using the ``buildhistory`` class, the check for the package
+-  If you are using the :ref:`buildhistory <ref-classes-buildhistory>` class,
+   the check for the package
    version going backwards is now controlled using a standard QA check.
    Thus, if you have customized your :term:`ERROR_QA` or :term:`WARN_QA` values
    and still wish to have this check performed, you should add
documentation/migration-guides/migration-1.7.rst +4 -2
index 8c642da202..88a6855d50 100644
@@ -43,7 +43,8 @@ The following :ref:`autotools <ref-classes-autotools>` class changes
 occurred:
 
 -  *A separate build directory is now used by default:* The
-   ``autotools`` class has been changed to use a directory for building
+   :ref:`autotools <ref-classes-autotools>` class has been
+   changed to use a directory for building
    (:term:`B`), which is separate from the source directory
    (:term:`S`). This is commonly referred to as ``B != S``, or
    an out-of-tree build.
@@ -54,7 +55,8 @@ occurred:
    manner, you will need to either patch the software so that it can
    build separately, or you will need to change the recipe to inherit
    the :ref:`autotools-brokensep <ref-classes-autotools>` class
-   instead of the ``autotools`` or ``autotools_stage`` classes.
+   instead of the :ref:`autotools <ref-classes-autotools>`
+   or ``autotools_stage`` classes.
 
 -  The ``--foreign`` option is no longer passed to ``automake`` when
    running ``autoconf``: This option tells ``automake`` that a
documentation/migration-guides/migration-2.1.rst +3 -3
index 3135d69caa..eb29694bb5 100644
@@ -106,12 +106,12 @@ as was previously assumed. Rather, the value changes based on whether
 large file support is enabled. For most software that uses ``autoconf``,
 this change should not be a problem. However, if you have a recipe that
 bypasses the standard :ref:`ref-tasks-configure` task
-from the ``autotools`` class and the software the recipe is building
+from the :ref:`autotools <ref-classes-autotools>` class and the software the recipe is building
 uses a very old version of ``autoconf``, the recipe might be incapable
 of determining the correct size of ``off_t`` during ``do_configure``.
 
 The best course of action is to patch the software as necessary to allow
-the default implementation from the ``autotools`` class to work such
+the default implementation from the :ref:`autotools <ref-classes-autotools>` class to work such
 that ``autoreconf`` succeeds and produces a working configure script,
 and to remove the overridden ``do_configure`` task such that the default
 implementation does get used.
@@ -262,7 +262,7 @@ The following changes have been made for the Poky distribution:
    With this class enabled, a tarball containing a pre-built C library
    is downloaded at the start of the build.
 
-   The ``uninative`` class is enabled through the
+   The :ref:`uninative <ref-classes-uninative>` class is enabled through the
    ``meta/conf/distro/include/yocto-uninative.inc`` file, which for
    those not using the Poky distribution, can include to easily enable
    the same functionality.
documentation/migration-guides/migration-2.2.rst +1 -1
index cbdc6a739e..c063deb44b 100644
@@ -439,7 +439,7 @@ The following miscellaneous changes have occurred:
 
 -  ``packagegroup-core-tools-testapps``: Removed Piglit.
 
--  ``image.bbclass``: Renamed COMPRESS(ION) to CONVERSION. This change
+-  :ref:`image.bbclass <ref-classes-image>`: Renamed COMPRESS(ION) to CONVERSION. This change
    means that ``COMPRESSIONTYPES``, ``COMPRESS_DEPENDS`` and
    ``COMPRESS_CMD`` are deprecated in favor of ``CONVERSIONTYPES``,
    ``CONVERSION_DEPENDS`` and ``CONVERSION_CMD``. The ``COMPRESS*``
documentation/migration-guides/migration-2.3.rst +1 -1
index b79bc541c5..0b6b33d2cb 100644
@@ -50,7 +50,7 @@ Consider the following:
    post-installation script that is installed by a function added to
    :term:`SYSROOT_PREPROCESS_FUNCS`.
 
-   For an example, see the ``pixbufcache`` class in ``meta/classes/`` in
+   For an example, see the :ref:`pixbufcache <ref-classes-pixbufcache>` class in ``meta/classes/`` in
    the :ref:`overview-manual/development-environment:yocto project source repositories`.
 
    .. note::
documentation/migration-guides/migration-2.4.rst +1 -1
index ae1a212b5d..ef5f32e6ef 100644
@@ -273,7 +273,7 @@ The following are additional changes:
    a single commit per build rather than one commit per subdirectory in
    the repository. This behavior assumes the commits are enabled with
    :term:`BUILDHISTORY_COMMIT` = "1", which
-   is typical. Previously, the ``buildhistory`` class made one commit
+   is typical. Previously, the :ref:`buildhistory <ref-classes-buildhistory>` class made one commit
    per subdirectory in the repository in order to make it easier to see
    the changes for a particular subdirectory. To view a particular
    change, specify that subdirectory as the last parameter on the
documentation/migration-guides/migration-2.5.rst +4 -4
index 79f804fa1d..bd75522773 100644
@@ -137,7 +137,7 @@ The following are BitBake changes:
 -  Several explicit "run this task for all recipes in the dependency
    tree" tasks have been removed (e.g. ``fetchall``, ``checkuriall``,
    and the ``*all`` tasks provided by the ``distrodata`` and
-   ``archiver`` classes). There is a BitBake option to complete this for
+   :ref:`archiver <ref-classes-archiver>` classes). There is a BitBake option to complete this for
    any arbitrary task. For example::
 
       bitbake <target> -c fetchall
@@ -187,7 +187,7 @@ Miscellaneous Changes
 
 The following are additional changes:
 
--  The ``kernel`` class supports building packages for multiple kernels.
+-  The :ref:`kernel <ref-classes-kernel>` class supports building packages for multiple kernels.
    If your kernel recipe or ``.bbappend`` file mentions packaging at
    all, you should replace references to the kernel in package names
    with ``${KERNEL_PACKAGE_NAME}``. For example, if you disable
@@ -195,7 +195,7 @@ The following are additional changes:
    ``RDEPENDS_kernel-base = ""`` you can avoid warnings using
    ``RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""`` instead.
 
--  The ``buildhistory`` class commits changes to the repository by
+-  The :ref:`buildhistory <ref-classes-buildhistory>` class commits changes to the repository by
    default so you no longer need to set ``BUILDHISTORY_COMMIT = "1"``.
    If you want to disable commits you need to set
    ``BUILDHISTORY_COMMIT = "0"`` in your configuration.
@@ -207,7 +207,7 @@ The following are additional changes:
    maintains a full-featured BSP in the ``meta-ti`` layer. This rename
    avoids the previous name clash that existed between the two BSPs.
 
--  The ``update-alternatives`` class no longer works with SysV ``init``
+-  The :ref:`update-alternatives <ref-classes-update-alternatives>` class no longer works with SysV ``init``
    scripts because this usage has been problematic. Also, the
    ``sysklogd`` recipe no longer uses ``update-alternatives`` because it
    is incompatible with other implementations.
documentation/migration-guides/migration-3.0.rst +2 -2
index 9a5f5714bd..610298bda6 100644
@@ -47,7 +47,7 @@ The following recipes have been removed.
 -  ``core-image-lsb-sdk``: Part of removed LSB support.
 
 -  ``cve-check-tool``: Functionally replaced by the ``cve-update-db``
-   recipe and ``cve-check`` class.
+   recipe and :ref:`cve-check <ref-classes-cve-check>` class.
 
 -  ``eglinfo``: No longer maintained. ``eglinfo`` from ``mesa-demos`` is
    an adequate and maintained alternative.
@@ -142,7 +142,7 @@ CVE Checking
 ------------
 
 ``cve-check-tool`` has been functionally replaced by a new
-``cve-update-db`` recipe and functionality built into the ``cve-check``
+``cve-update-db`` recipe and functionality built into the :ref:`cve-check <ref-classes-cve-check>`
 class. The result uses NVD JSON data feeds rather than the deprecated
 XML feeds that ``cve-check-tool`` was using, supports CVSSv3 scoring,
 and makes other improvements.
documentation/migration-guides/migration-3.1.rst +2 -2
index 80b8f6baa5..cb0296717e 100644
@@ -125,7 +125,7 @@ renamed to ``features_check``; the ``distro_features_check`` class still
 exists but generates a warning and redirects to the new class. In
 preparation for a future removal of the old class it is recommended that
 you update recipes currently inheriting ``distro_features_check`` to
-inherit ``features_check`` instead.
+inherit :ref:`features_check <ref-classes-features_check>` instead.
 
 .. _migration-3.1-removed-classes:
 
@@ -241,7 +241,7 @@ circumstances:
    does not inherit the new ``mime-xdg`` class
 
 -  A recipe installs ``.xml`` files into ``${datadir}/mime/packages``
-   but does not inherit the ``mime`` class
+   but does not inherit the :ref:`mime <ref-classes-mime>` class
 
 .. _migration-3.1-x86-live-wic:
 
documentation/migration-guides/migration-3.2.rst +1 -1
index a940f23238..d593effe97 100644
@@ -209,7 +209,7 @@ deploy class now cleans ``DEPLOYDIR`` before ``do_deploy``
 
 ``do_deploy`` as implemented in the :ref:`deploy <ref-classes-deploy>` class now cleans up ${:term:`DEPLOYDIR`} before running, just as ``do_install`` cleans up ${:term:`D`} before running. This reduces the risk of :term:`DEPLOYDIR` being accidentally contaminated by files from previous runs, possibly even with different config, in case of incremental builds.
 
-Most recipes and classes that inherit the ``deploy`` class or interact with ``do_deploy`` are unlikely to be affected by this unless they add ``prefuncs`` to ``do_deploy`` *which also* put files into ``${DEPLOYDIR}`` - these should be refactored to use ``do_deploy_prepend`` instead.
+Most recipes and classes that inherit the :ref:`deploy <ref-classes-deploy>` class or interact with ``do_deploy`` are unlikely to be affected by this unless they add ``prefuncs`` to ``do_deploy`` *which also* put files into ``${DEPLOYDIR}`` - these should be refactored to use ``do_deploy_prepend`` instead.
 
 
 .. _migration-3.2-nativesdk-sdk-provides-dummy:
documentation/migration-guides/migration-3.3.rst +1 -1
index 28857e820b..f065a17e68 100644
@@ -64,7 +64,7 @@ New ``python3targetconfig`` class
 
 A new :ref:`python3targetconfig <ref-classes-python3targetconfig>` class has been
 created for situations where you would previously have inherited the
-``python3native`` class but need access to target configuration data (such as
+:ref:`python3native <ref-classes-python3native>` class but need access to target configuration data (such as
 correct installation directories). Recipes where this situation applies should
 be changed to inherit ``python3targetconfig`` instead of ``python3native``. This
 also adds a dependency on target ``python3``, so it should only be used where
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/3 ref-manual: add more class references

In reply to Michael Opdenacker
---
 documentation/ref-manual/classes.rst   |  4 +--
 documentation/ref-manual/structure.rst |  2 +-
 documentation/ref-manual/tasks.rst     |  4 +--
 documentation/ref-manual/variables.rst | 48 ++++++++++++--------------
 4 files changed, 28 insertions(+), 30 deletions(-)
documentation/ref-manual/classes.rst +2 -2
index 5bc4472e34..95dc185e62 100644
@@ -570,11 +570,11 @@ be performed using the
 .. note::
 
    The user and group operations added using the
-   extrausers
+   :ref:`extrausers <ref-classes-extrausers>`
    class are not tied to a specific recipe outside of the recipe for the
    image. Thus, the operations can be performed across the image as a
    whole. Use the
-   useradd
+   :ref:`useradd <ref-classes-useradd>`
    class to add user and group configuration to a specific recipe.
 
 Here is an example that uses this class in an image recipe::
documentation/ref-manual/structure.rst +1 -1
index 5f00edb06c..5d2e3a86ef 100644
@@ -231,7 +231,7 @@ is available via the :term:`TOPDIR` variable.
 -----------------------
 
 The OpenEmbedded build system creates this directory when you enable
-build history via the ``buildhistory`` class file. The directory
+build history via the :ref:`buildhistory <ref-classes-buildhistory>` class file. The directory
 organizes build information into image, packages, and SDK
 subdirectories. For information on the build history feature, see the
 ":ref:`dev-manual/common-tasks:maintaining build output quality`"
documentation/ref-manual/tasks.rst +2 -2
index 299969dea4..8d563714a1 100644
@@ -80,7 +80,7 @@ task runs with the current working directory set to
 Recipes implementing this task should inherit the
 :ref:`deploy <ref-classes-deploy>` class and should write the output
 to ``${``\ :term:`DEPLOYDIR`\ ``}``, which is not to be
-confused with ``${DEPLOY_DIR}``. The ``deploy`` class sets up
+confused with ``${DEPLOY_DIR}``. The :ref:`deploy <ref-classes-deploy>` class sets up
 ``do_deploy`` as a shared state (sstate) task that can be accelerated
 through sstate use. The sstate mechanism takes care of copying the
 output from ``${DEPLOYDIR}`` to ``${DEPLOY_DIR_IMAGE}``.
@@ -102,7 +102,7 @@ Adding ``do_deploy`` after other tasks works the same way.
 .. note::
 
    You do not need to add ``before do_build`` to the ``addtask`` command
-   (though it is harmless), because the ``base`` class contains the following::
+   (though it is harmless), because the :ref:`base <ref-classes-base>` class contains the following::
 
            do_build[recrdeptask] += "do_deploy"
 
documentation/ref-manual/variables.rst +23 -25

177 lines not on this page · raw message

Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/3 misc manuals: add further class references

In reply to Michael Opdenacker
---
 documentation/dev-manual/common-tasks.rst  | 32 ++++++++++------------
 documentation/overview-manual/concepts.rst |  2 +-
 documentation/test-manual/intro.rst        |  2 +-
 3 files changed, 17 insertions(+), 19 deletions(-)
documentation/dev-manual/common-tasks.rst +15 -17
index 9611a4f206..5ac347d18b 100644
@@ -938,7 +938,8 @@ a recipe and using :term:`EXTRA_IMAGE_FEATURES` from within your
 :term:`Build Directory`.
 
 To understand how these features work, the best reference is
-``meta/classes/image.bbclass``. This class lists out the available
+:ref:`meta/classes/image.bbclass <ref-classes-image>`.
+This class lists out the available
 :term:`IMAGE_FEATURES` of which most map to package groups while some, such
 as ``debug-tweaks`` and ``read-only-rootfs``, resolve as general
 configuration settings.
@@ -2113,7 +2114,7 @@ statement that essentially identifies itself as being able to provide
 
    PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }"
 
-Any recipe that inherits the ``kernel`` class is
+Any recipe that inherits the :ref:`kernel <ref-classes-kernel>` class is
 going to utilize a :term:`PROVIDES` statement that identifies that recipe as
 being able to provide the ``virtual/kernel`` item.
 
@@ -2459,7 +2460,7 @@ sometimes you have no choice.
 The easiest solution is to create a recipe that uses the
 :ref:`bin_package <ref-classes-bin-package>` class
 and to be sure that you are using default locations for build artifacts.
-In most cases, the ``bin_package`` class handles "skipping" the
+In most cases, the :ref:`bin_package <ref-classes-bin-package>` class handles "skipping" the
 configure and compile steps as well as sets things up to grab packages
 from the appropriate area. In particular, this class sets ``noexec`` on
 both the :ref:`ref-tasks-configure`
@@ -2467,7 +2468,7 @@ and :ref:`ref-tasks-compile` tasks,
 sets ``FILES:${PN}`` to "/" so that it picks up all files, and sets up a
 :ref:`ref-tasks-install` task, which
 effectively copies all files from ``${S}`` to ``${D}``. The
-``bin_package`` class works well when the files extracted into ``${S}``
+:ref:`bin_package <ref-classes-bin-package>` class works well when the files extracted into ``${S}``
 are already laid out in the way they should be laid out on the target.
 For more information on these variables, see the
 :term:`FILES`,
@@ -2492,7 +2493,7 @@ Reference Manual's variable glossary.
       section in the Yocto Project Overview and Concepts Manual for more
       information.
 
-If you cannot use the ``bin_package`` class, you need to be sure you are
+If you cannot use the :ref:`bin_package <ref-classes-bin-package>` class, you need to be sure you are
 doing the following:
 
 -  Create a recipe where the
@@ -2532,7 +2533,7 @@ doing the following:
 
 .. note::
 
-  If image prelinking is enabled (e.g. "image-prelink" is in :term:`USER_CLASSES`
+  If image prelinking is enabled (e.g. :ref:`image-prelink <ref-classes-image-prelink>` is in :term:`USER_CLASSES`
   which it is by default), prelink will change the binaries in the generated images
   and this often catches people out. Remove that class to ensure binaries are
   preserved exactly if that is necessary.
@@ -4454,19 +4455,16 @@ Follow these steps to build your target using the files in the downloads
 directory:
 
 1. *Using Local Files Only:* Inside your ``local.conf`` file, add the
-   :term:`SOURCE_MIRROR_URL`
-   variable, inherit the
-   :ref:`own-mirrors <ref-classes-own-mirrors>`
-   class, and use the
-   :term:`BB_NO_NETWORK`
-   variable to your ``local.conf``.
+   :term:`SOURCE_MIRROR_URL` variable, inherit the
+   :ref:`own-mirrors <ref-classes-own-mirrors>` class, and use the
+   :term:`BB_NO_NETWORK` variable to your ``local.conf``.
    ::
 
       SOURCE_MIRROR_URL ?= "file:///home/your-download-dir/"
       INHERIT += "own-mirrors"
       BB_NO_NETWORK = "1"
 
-   The :term:`SOURCE_MIRROR_URL` and ``own-mirror``
+   The :term:`SOURCE_MIRROR_URL` and :ref:`own-mirrors <ref-classes-own-mirrors>`
    class set up the system to use the downloads directory as your "own
    mirror". Using the :term:`BB_NO_NETWORK` variable makes sure that
    BitBake's fetching process in step 3 stays local, which means files
@@ -4748,7 +4746,8 @@ done using the
 Eventually, all recipes will be covered and this list will not be
 needed.
 
-For the most part, the Multilib class extension works automatically to
+For the most part, the :ref:`Multilib <ref-classes-multilib*>`
+class extension works automatically to
 extend the package name from ``${PN}`` to ``${MLPREFIX}${PN}``, where
 :term:`MLPREFIX` is the particular multilib (e.g. "lib32-" or "lib64-").
 Standard variables such as
@@ -4760,8 +4759,7 @@ Standard variables such as
 :term:`PACKAGES_DYNAMIC` are
 automatically extended by the system. If you are extending any manual
 code in the recipe, you can use the ``${MLPREFIX}`` variable to ensure
-those names are extended correctly. This automatic extension code
-resides in ``multilib.bbclass``.
+those names are extended correctly.
 
 Using Multilib
 ~~~~~~~~~~~~~~
@@ -10967,7 +10965,7 @@ accidental release of proprietary software. The Yocto Project provides
 an :ref:`archiver <ref-classes-archiver>` class to
 help avoid some of these concerns.
 
-Before you employ :term:`DL_DIR` or the ``archiver`` class, you need to
+Before you employ :term:`DL_DIR` or the :ref:`archiver <ref-classes-archiver>` class, you need to
 decide how you choose to provide source. The source ``archiver`` class
 can generate tarballs and SRPMs and can create them with various levels
 of compliance in mind.
documentation/overview-manual/concepts.rst +1 -1
index 89a5eb49fb..33b4071026 100644
@@ -1800,7 +1800,7 @@ type of output occurs when a set of data is merged into a shared
 directory tree such as the sysroot.
 
 The Yocto Project team has tried to keep the details of the
-implementation hidden in ``sstate`` class. From a user's perspective,
+implementation hidden in the :ref:`sstate <ref-classes-sstate>` class. From a user's perspective,
 adding shared state wrapping to a task is as simple as this
 :ref:`ref-tasks-deploy` example taken
 from the :ref:`deploy <ref-classes-deploy>` class::
documentation/test-manual/intro.rst +1 -1
index 101d283665..4a3a97e29a 100644
@@ -121,7 +121,7 @@ the following types of tests:
 
       $ bitbake image -c testsdkext
 
-   The tests utilize the ``testsdkext`` class and the ``do_testsdkext`` task.
+   The tests utilize the :ref:`testsdkext <ref-classes-testsdk>` class and the ``do_testsdkext`` task.
 
 -  *Feature Testing:* Various scenario-based tests are run through the
    :ref:`OpenEmbedded Self test (oe-selftest) <ref-manual/release-process:Testing and Quality Assurance>`. We test oe-selftest on each of the main distributions
Signature · 1 line
2.25.1