<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>16256</bug_id>
          
          <creation_ts>2026-04-20 14:37:50 +0000</creation_ts>
          <short_desc>DISTRO_FEATURES_DEFAULTS is not appended to features in sanity checks</short_desc>
          <delta_ts>2026-04-24 10:17:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>configuration</component>
          <version>6.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.0 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Louis Rannou">louis.rannou</reporter>
          <assigned_to name="Paul Barker">paul</assigned_to>
          <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>105157</commentid>
    <comment_count>0</comment_count>
    <who name="Louis Rannou">louis.rannou</who>
    <bug_when>2026-04-20 14:37:50 +0000</bug_when>
    <thetext>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 &apos;rauc&apos; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105215</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-04-23 14:41:26 +0000</bug_when>
    <thetext>Paul and Richard have found some problems with how DISTRO_FEATURES* work.
patches in master-next help but not completely.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105257</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Barker">paul</who>
    <bug_when>2026-04-24 10:17:46 +0000</bug_when>
    <thetext>This appears to be fixed after commit 6b553a5042b9 (&quot;base/bitbake.conf: Rework DISTRO_FEATURES and MACHINE_FEATURES default handling&quot;) [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 += &quot;security&quot;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>