From b1d17778658275a7757419f53bd47ed3906d50b2 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Sun, 9 Oct 2022 16:44:31 +1300 Subject: Update documentation for classes split * Make reference to meta/classes* instead of just meta/classes * Update each reference to the path where the class has moved * Add a brief explanation to the classes reference explaining the split * Add a note to INHERIT, INHERIT_DISTRO, IMAGE_CLASSES and USER_CLASSES variable glossary entries mentioning where the specified classes must be located. I contemplated adding the same note to PACKAGE_CLASSES but decided against it, as it has a very specific usage and such a note might distract from the narrative of that entry. * Also trim the IMAGE_CLASSES entry which was quite outdated. * INHERIT += no longer works with testimage so drop the note about that (From yocto-docs rev: e76bed00b452d3049f6c22afbfb980b557a141bd) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- documentation/ref-manual/classes.rst | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'documentation/ref-manual/classes.rst') diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index f24c579f16..50dbb5a3a6 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst @@ -13,8 +13,14 @@ some default behavior. Any :term:`Metadata` usually found in a recipe can also be placed in a class file. Class files are identified by the extension -``.bbclass`` and are usually placed in a ``classes/`` directory beneath -the ``meta*/`` directory found in the :term:`Source Directory`. +``.bbclass`` and are usually placed in one of a set of subdirectories +beneath the ``meta*/`` directory found in the :term:`Source Directory`: + + - ``classes-recipe/`` - classes intended to be inherited by recipes + individually + - ``classes-global/`` - classes intended to be inherited globally + - ``classes/`` - classes whose usage context is not clearly defined + Class files can also be pointed to by :term:`BUILDDIR` (e.g. ``build/``) in the same way as ``.conf`` files in the ``conf`` directory. Class files are searched for @@ -22,7 +28,7 @@ in :term:`BBPATH` using the same method by which ``.conf`` files are searched. This chapter discusses only the most useful and important classes. Other -classes do exist within the ``meta/classes`` directory in the Source +classes do exist within the ``meta/classes*`` directories in the Source Directory. You can reference the ``.bbclass`` files directly for more information. @@ -2778,11 +2784,9 @@ images using QEMU and on actual hardware. The classes handle loading the tests and starting the image. To use the classes, you need to perform steps to set up the environment. -.. note:: +To enable this class, add the following to your configuration:: - Best practices include using :term:`IMAGE_CLASSES` rather than - :term:`INHERIT` to inherit the ``testimage`` class for automated image - testing. + IMAGE_CLASSES += "testimage" The tests are commands that run on the target system over ``ssh``. Each test is written in Python and makes use of the ``unittest`` module. @@ -2937,7 +2941,7 @@ To use this class, you need to define a number of variables: These variables list alternative commands needed by a package, provide pathnames for links, default links for targets, and so forth. For details on how to use this class, see the comments in the -:yocto_git:`update-alternatives.bbclass ` +:yocto_git:`update-alternatives.bbclass ` file. .. note:: -- cgit v1.2.3-54-g00ecf