Since commit 3194d6868dd14e40ae670db089e5bf6f862d3044 (meta: Support opting out of any machine features) [1], DISTRO_FEATURES is appended with DISTRO_FEATURES_DEFAULTS when filter_defaults_features from utils.py is called. In sanity checks, the filter is not called and the variable DISTRO_FEATURES is not finalized. Several layers have such a sanity check: https://github.com/ni/meta-security/blob/nilrt/master/scarthgap/classes/sanity-meta-security.bbclass, https://github.com/rauc/meta-rauc/blob/master/classes-global/sanity-meta-rauc.bbclass As an example, the rauc sanity check will raise a warning when 'rauc' in declared in DISTRO_FEATURES_DEFAULTS but not in DISTRO_FEATURES. What is the expected behaviour in this case ? [1]: https://git.openembedded.org/openembedded-core/commit/?id=3194d6868dd14e40ae670db089e5bf6f862d3044
Paul and Richard have found some problems with how DISTRO_FEATURES* work. patches in master-next help but not completely.
This appears to be fixed after commit 6b553a5042b9 ("base/bitbake.conf: Rework DISTRO_FEATURES and MACHINE_FEATURES default handling") [1]. [1]: https://git.openembedded.org/openembedded-core/commit/?id=6b553a5042b9d5828a9da675ede16e10f06dae90 Tested by adding the meta-security layer, then setting in local.conf: DISTRO_FEATURES_DEFAULTS += "security"