Some packages (for example, kmod) have built-time configure options for additional debugging support. Similar to manpages.bbclass, this new class turns the new "debug-build" DISTRO_FEATURE into "debug" and "logging" PACKAGECONFIGs if the current recipe has those.
Another usage will be to mark images when undesired distro features like "debug-build" were used. This protects against accidentally using such an image as production image on a device. Signed-off-by: Patrick Ohly <patrick.o...@intel.com> --- meta/classes/build-mode.bbclass | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 meta/classes/build-mode.bbclass diff --git a/meta/classes/build-mode.bbclass b/meta/classes/build-mode.bbclass new file mode 100644 index 0000000..e5564dd --- /dev/null +++ b/meta/classes/build-mode.bbclass @@ -0,0 +1,16 @@ +# Enable additional logging and debugging features that are unsuitable +# for production images when building in "debug" mode. "kmod" is +# an example of a recipe which has both "debug" and "logging" +# PACKAGECONFIGs. +# +# This distro feature is not very flexible. More useful in practice +# is the IMAGE_MODE in image.bbclass, which allows building production +# and development images in the same build configuration. +PACKAGECONFIG_append_class-target = "${@ \ + (' ' + ' '.join(set(d.getVarFlags('PACKAGECONFIG').keys()).intersection(('debug', 'logging')))) if \ + bb.utils.contains('DISTRO_FEATURES', 'debug-build', True, False, d) \ + else ''}" + +# The following DISTRO_FEATURES have to be considered too dangerous +# and/or unsuitable for use in production. +DISTRO_FEATURES_NON_PRODUCTION ??= "debug-build" -- git-series 0.9.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core