summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual/classes.rst
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@microsoft.com>2022-10-09 16:44:31 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-10-19 17:32:57 +0100
commitb1d17778658275a7757419f53bd47ed3906d50b2 (patch)
treee8098b8c308feb668dc83138ada8c40e6b1de046 /documentation/ref-manual/classes.rst
parentc29eb10e31809a523109d638b80175d68dfc9930 (diff)
downloadpoky-b1d17778658275a7757419f53bd47ed3906d50b2.tar.gz
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 <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/ref-manual/classes.rst')
-rw-r--r--documentation/ref-manual/classes.rst20
1 files changed, 12 insertions, 8 deletions
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.
13 13
14Any :term:`Metadata` usually found in a recipe can also be 14Any :term:`Metadata` usually found in a recipe can also be
15placed in a class file. Class files are identified by the extension 15placed in a class file. Class files are identified by the extension
16``.bbclass`` and are usually placed in a ``classes/`` directory beneath 16``.bbclass`` and are usually placed in one of a set of subdirectories
17the ``meta*/`` directory found in the :term:`Source Directory`. 17beneath the ``meta*/`` directory found in the :term:`Source Directory`:
18
19 - ``classes-recipe/`` - classes intended to be inherited by recipes
20 individually
21 - ``classes-global/`` - classes intended to be inherited globally
22 - ``classes/`` - classes whose usage context is not clearly defined
23
18Class files can also be pointed to by 24Class files can also be pointed to by
19:term:`BUILDDIR` (e.g. ``build/``) in the same way as 25:term:`BUILDDIR` (e.g. ``build/``) in the same way as
20``.conf`` files in the ``conf`` directory. Class files are searched for 26``.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``
22files are searched. 28files are searched.
23 29
24This chapter discusses only the most useful and important classes. Other 30This chapter discusses only the most useful and important classes. Other
25classes do exist within the ``meta/classes`` directory in the Source 31classes do exist within the ``meta/classes*`` directories in the Source
26Directory. You can reference the ``.bbclass`` files directly for more 32Directory. You can reference the ``.bbclass`` files directly for more
27information. 33information.
28 34
@@ -2778,11 +2784,9 @@ images using QEMU and on actual hardware. The classes handle loading the
2778tests and starting the image. To use the classes, you need to perform 2784tests and starting the image. To use the classes, you need to perform
2779steps to set up the environment. 2785steps to set up the environment.
2780 2786
2781.. note:: 2787To enable this class, add the following to your configuration::
2782 2788
2783 Best practices include using :term:`IMAGE_CLASSES` rather than 2789 IMAGE_CLASSES += "testimage"
2784 :term:`INHERIT` to inherit the ``testimage`` class for automated image
2785 testing.
2786 2790
2787The tests are commands that run on the target system over ``ssh``. Each 2791The tests are commands that run on the target system over ``ssh``. Each
2788test is written in Python and makes use of the ``unittest`` module. 2792test 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:
2937These variables list alternative commands needed by a package, provide 2941These variables list alternative commands needed by a package, provide
2938pathnames for links, default links for targets, and so forth. For 2942pathnames for links, default links for targets, and so forth. For
2939details on how to use this class, see the comments in the 2943details on how to use this class, see the comments in the
2940:yocto_git:`update-alternatives.bbclass </poky/tree/meta/classes/update-alternatives.bbclass>` 2944:yocto_git:`update-alternatives.bbclass </poky/tree/meta/classes-recipe/update-alternatives.bbclass>`
2941file. 2945file.
2942 2946
2943.. note:: 2947.. note::