<?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>16177</bug_id>
          
          <creation_ts>2026-02-24 14:10:04 +0000</creation_ts>
          <short_desc>devtool/varhistory does not track overrides if used to include a file</short_desc>
          <delta_ts>2026-05-21 15:07:35 +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>devtools / tool chain</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Peter Hoyes">Peter.Hoyes</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>ccasciato</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>104386</commentid>
    <comment_count>0</comment_count>
    <who name="Peter Hoyes">Peter.Hoyes</who>
    <bug_when>2026-02-24 14:10:04 +0000</bug_when>
    <thetext>If patch files are added to SRC_URI conditionally using an override in a bbappend file, devtool detects this override and:
 * Creates a branch called `devtool-override-xxx` when running &quot;devtool modify&quot;
 * Populates the correct SRC_URI value with the patches in this branch when running &quot;devtool finish&quot;

If patch files are added in a .inc file that is conditionally included from a .bbappend file (e.g. https://git.yoctoproject.org/meta-arm/tree/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%25.bbappend), then neither of the above happen. This makes it tricky to use devtool with recipes and machines that use this pattern. This pattern is used heavliy in meta-arm-bsp, and it useful particularly for firmware recipes which have many machine-specific customizations.

An initial investigation suggests the above is because devtool obtains its override metadata from varhistory, which doesn&apos;t track overrides through variables used for includes. This makes sense in theory I guess because include variables can contain arbitrarily complex variable expressions, not just overrides.

One way to (theoretically) make the problem more tractable might be to introduce overrides directly on require&apos;s, for this, e.g. &quot;require:corstone1000 ${MACHINE_U-BOOT_REQUIRE}&quot;...? This way the override context could (theoretically) be applied to everything in the required file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104406</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-02-26 15:39:01 +0000</bug_when>
    <thetext>Ross, Peter, 

Can you post to the bitbake list to see if we can start a discussion about the problem and potential solutions.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>