<?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>16212</bug_id>
          
          <creation_ts>2026-03-25 03:23:02 +0000</creation_ts>
          <short_desc>bitbake-setup: build/conf change detection limited to source updates</short_desc>
          <delta_ts>2026-04-10 12:21:09 +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>BitBake</product>
          <component>bitbake</component>
          <version>6.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</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="Clayton Casciato">ccasciato</reporter>
          <assigned_to name="Alexander Kanavin">alex.kanavin</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.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>104790</commentid>
    <comment_count>0</comment_count>
    <who name="Clayton Casciato">ccasciato</who>
    <bug_when>2026-03-25 03:23:02 +0000</bug_when>
    <thetext>Potential problem: on `update`, a change to build/conf/local.conf is only detected on a source update

Potential behavior: on `update`, change is detected even when no source updates occur

I discovered this discrepancy while configuring Scarthgap, where local.conf may be populated using TEMPLATECONF.

Setup:
```
test-bbs$ git clone https://git.openembedded.org/bitbake bitbake

test-bbs$ git -C bitbake checkout a70c336790a9188aae67975fac6ca13579ad1d3e

test-bbs$ cp bitbake/default-registry/configurations/oe-nodistro-master.conf.json oe-nodistro-custom.conf.json

test-bbs$ sed -i &apos;8{s/^\([[:space:]]*\).*/\1&quot;rev&quot;: &quot;a70c336790a9188aae67975fac6ca13579ad1d3e&quot;/;}&apos; oe-nodistro-custom.conf.json
test-bbs$ sed -i &apos;15{s/^\([[:space:]]*\).*/\1&quot;rev&quot;: &quot;be8cdcf13a658e9e81ff2f7b71d1c8c37a920ce7&quot;/;}&apos; oe-nodistro-custom.conf.json
test-bbs$ sed -i &apos;22{s/^\([[:space:]]*\).*/\1&quot;rev&quot;: &quot;d97cfeaa55ed42722998d3313c1857aa377f6881&quot;/;}&apos; oe-nodistro-custom.conf.json

test-bbs$ ./bitbake/bin/bitbake-setup init --non-interactive --setup-dir-name oe-nodistro-custom oe-nodistro-custom.conf.json nodistro machine/qemuarm64

test-bbs$ . bitbake-builds/oe-nodistro-custom/build/init-build-env
```

Introduce change:
```
test-bbs$ echo &quot;# Modification detection test&quot; &gt;&gt; bitbake-builds/oe-nodistro-custom/build/conf/local.conf
```

local.conf change undetected:
```
test-bbs$ ./bitbake/bin/bitbake-setup update
NOTE: Bitbake-setup is using [...]/test-bbs/bitbake-builds as top directory.
NOTE: Reading configuration from local file
    [...]/test-bbs/oe-nodistro-custom.conf.json

Configuration in [...]/test-bbs/bitbake-builds/oe-nodistro-custom has not changed.
```

local.conf change detected on a source change (e.g. BitBake):
```
test-bbs$ sed -i &apos;8{s/^\([[:space:]]*\).*/\1&quot;rev&quot;: &quot;112bddd8fc684fbdd71139429251b127739f863b&quot;/;}&apos; oe-nodistro-custom.conf.json

test-bbs$ ./bitbake/bin/bitbake-setup update
[...]

Upstream bitbake configuration changes were found:
diff &apos;--color=always&apos; -uNr [...]/test-bbs/bitbake-builds/oe-nodistro-custom/build/conf-backup.20260324205715/local.conf [...]/test-bbs/bitbake-builds/oe-nodistro-custom/build/conf/local.conf
--- [...]/test-bbs/bitbake-builds/oe-nodistro-custom/build/conf-backup.20260324205715/local.conf      2026-03-24 20:54:31.919838770 -0600
+++ [...]/test-bbs/bitbake-builds/oe-nodistro-custom/build/conf/local.conf    2026-03-24 20:57:15.544151275 -0600
@@ -5,4 +5,3 @@
 # it is recommended to put them into a distro config, or to create
 # layer fragments from changes made here.
 #
-# Modification detection test
```

This is also detected with a change to a different source (e.g. OE-C):
```
test-bbs$ sed -i &apos;15{s/^\([[:space:]]*\).*/\1&quot;rev&quot;: &quot;aa441c5d7c306fb308cb7890a8ebe3cd218780b5&quot;/;}&apos; oe-nodistro-custom.conf.json

test-bbs$ ./bitbake/bin/bitbake-setup update
[...]

Upstream bitbake configuration changes were found:
[...]
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104838</commentid>
    <comment_count>1</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2026-03-26 15:31:14 +0000</bug_when>
    <thetext>But is this a real problem? Is there a use case? If you make modifications in build/conf, I don&apos;t think bitbake-setup should track what you do there and compare that against &apos;pristine&apos; build/conf, if nothing has otherwise changed. That would be heavy handed: people modify build/conf all the time, and they don&apos;t need bitbake-setup telling them their local modifications caused the build to become &apos;out of date&apos;.

The build/conf comparison only kicks in when updates happened elsewhere (e.g. in config template, or layer revisions changed), because then build/conf may have changed as well, and it needs to be setup anew, and compared with the existing one. At that point there&apos;s no way to tell what was original, and what was added by the user. Bitbake-setup could potentially track that too (by putting a copy of the original build/conf into a local git under config/), but again, I do not see the use case clearly, but I do see increased code complexity that would result.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104860</commentid>
    <comment_count>2</comment_count>
    <who name="Clayton Casciato">ccasciato</who>
    <bug_when>2026-03-30 14:50:39 +0000</bug_when>
    <thetext>Thanks for the feedback, Alex!

I do not have a sample use case where this is required.

Related to the original finding, it would be convenient to be able to configure the default value of `--update-bb-conf` (per Setup).
This is most relevant for sans-fragment builds (e.g. Scarthgap), where the &quot;no&quot; option would be handy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105024</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-04-09 15:05:55 +0000</bug_when>
    <thetext>Alex ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105043</commentid>
    <comment_count>4</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2026-04-10 12:21:09 +0000</bug_when>
    <thetext>Alright. Closing for lack of clear use case.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>