From eca314a5c85938b92a82f6ddad860d2c8bfc8c35 Mon Sep 17 00:00:00 2001 From: Antonin Godard Date: Thu, 24 Oct 2024 10:59:06 +0200 Subject: ref-manual: faq: add q&a on class appends Add the suggestion by Richard to the FAQ, with some minor rewordings and additional punctuations. Suggested-by: Richard Purdie Reviewed-by: Quentin Schulz (From yocto-docs rev: 7de91ada04715103776497971b34d28f24f7148a) Signed-off-by: Antonin Godard (cherry picked from commit 2466a5e7973bf6e724f1cf0b42f838065847d283) Signed-off-by: Antonin Godard Signed-off-by: Steve Sakoman --- documentation/ref-manual/faq.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'documentation') diff --git a/documentation/ref-manual/faq.rst b/documentation/ref-manual/faq.rst index bab284bbfd..9e3418e10d 100644 --- a/documentation/ref-manual/faq.rst +++ b/documentation/ref-manual/faq.rst @@ -259,6 +259,25 @@ Within the :term:`Build Directory`, is the ``tmp`` directory. To remove all the build output yet preserve any source code or downloaded files from previous builds, simply remove the ``tmp`` directory. +Why isn't there a way to append bbclass files like bbappend for recipes? +------------------------------------------------------------------------ + +The Yocto Project has consciously chosen not to implement such functionality. +Class code is designed to be shared and reused, and exposes some level of +configuration to its users. We want to encourage people to share these changes +so we can build the best classes. + +If the ``append`` functionality was available for classes, our evidence and +experience suggest that people would create their custom changes in their +layer instead of sharing and discussing the issues and/or limitations they +encountered. This would lead to bizarre class interactions when new layers are +included. We therefore consciously choose to have a natural pressure to share +class code improvements or fixes. + +There are also technical considerations like which recipes a class append would +apply to and how that would fit within the layer model. These are complications +we think we can live without! + Customizing generated images ============================ -- cgit v1.2.3-54-g00ecf