Chapter 7. Classes

Table of Contents

7.1. The base class - base.bbclass
7.2. Autotooled Packages - autotools.bbclass
7.3. Alternatives - update-alternatives.bbclass
7.4. Initscripts - update-rc.d.bbclass
7.5. Binary config scripts - binconfig.bbclass
7.6. Debian renaming - debian.bbclass
7.7. Pkg-config - pkgconfig.bbclass
7.8. Distribution of sources - src_distribute_local.bbclass
7.9. Perl modules - cpan.bbclass
7.10. Python extensions - distutils.bbclass
7.11. Developer Shell - devshell.bbclass
7.12. Package Groups - packagegroup.bbclass
7.13. Packaging - package*.bbclass
7.14. Building kernels - kernel.bbclass
7.15. Creating images - image.bbclass and rootfs*.bbclass
7.16. Host System sanity checks - sanity.bbclass
7.17. Generated output quality assurance checks - insane.bbclass
7.18. Autotools configuration data cache - siteinfo.bbclass
7.19. Adding Users - useradd.bbclass
7.20. Using External Source - externalsrc.bbclass
7.21. Other Classes

Class files are used to abstract common functionality and share it amongst multiple .bb files. Any metadata usually found in a .bb file 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 Source Directory. Class files can also be pointed to by BUILDDIR (e.g. build/)in the same way as .conf files in the conf directory. Class files are searched for in BBPATH using the same method by which .conf files are searched.

In most cases inheriting the class is enough to enable its features, although for some classes you might need to set variables or override some of the default behaviour.