Bug 16190

Summary: bitbake-setup: specifying fixed revisions causes spurious update
Product: [Build System, Metadata & Runtime] BitBake Reporter: Clayton Casciato <ccasciato>
Component: bitbakeAssignee: Alexander Kanavin <alex.kanavin>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: alex.kanavin, poky.bs.watcher, poky.watcher, randy.macleod
Version: 6.0   
Target Milestone: 6.0   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Clayton Casciato 2026-03-05 02:48:57 UTC
> Unexpected behavior

Setup (using a fixed revision in config):
```
test-bbs$ git clone https://git.openembedded.org/bitbake

test-bbs$ git -C bitbake checkout 6b91f4ff3852a5a3c1089d5bb9d4009a2e6fde58

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

test-bbs$ sed -i '8{s/^\([[:space:]]*\).*/\1"rev": "6b91f4ff3852a5a3c1089d5bb9d4009a2e6fde58"/;}' oe-nodistro-custom.conf.json

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

test-bbs$ source bitbake-builds/oe-nodistro-master-custom-1/build/init-build-env 
OpenEmbedded 'nodistro'
```

Spurious config update (and note?) are seen:
```
test-bbs$ ./bitbake/bin/bitbake-setup update
NOTE: Bitbake-setup is using [SNIP]/workspace/test-bbs/bitbake-builds as top directory.
NOTE: Reading configuration from local file
    oe-nodistro-custom.conf.json
NOTE: Layer repository https://git.openembedded.org/bitbake checked out into [SNIP]/workspace/test-bbs/bitbake-builds/oe-nodistro-master-custom-1/layers/bitbake updated revision 6b91f4ff3852a5a3c1089d5bb9d4009a2e6fde58 from 6b91f4ff3852a5a3c1089d5bb9d4009a2e6fde58 to 48efc36b4e03f736e7521d269ced3417522784e9
Fetching layer/tool repositories into [SNIP]/workspace/test-bbs/bitbake-builds/oe-nodistro-master-custom-1/layers
    bitbake
    openembedded-core
    yocto-docs

Setting up bitbake configuration in
    [SNIP]/workspace/test-bbs/bitbake-builds/oe-nodistro-master-custom-1/build

New bitbake configuration from upstream is the same as the current one, no need to update it. 

test-bbs$ git -C bitbake-builds/oe-nodistro-master-custom-1/config log --oneline -1
21f0575 (HEAD -> main) Configuration at Wed Mar  4 19:38:03 2026

test-bbs$ ./bitbake/bin/bitbake-setup update
NOTE: Bitbake-setup is using [SNIP]/workspace/test-bbs/bitbake-builds as top directory.
NOTE: Reading configuration from local file
    oe-nodistro-custom.conf.json
NOTE: Layer repository https://git.openembedded.org/bitbake checked out into [SNIP]/workspace/test-bbs/bitbake-builds/oe-nodistro-master-custom-1/layers/bitbake updated revision 6b91f4ff3852a5a3c1089d5bb9d4009a2e6fde58 from 6b91f4ff3852a5a3c1089d5bb9d4009a2e6fde58 to 48efc36b4e03f736e7521d269ced3417522784e9
Fetching layer/tool repositories into [SNIP]/workspace/test-bbs/bitbake-builds/oe-nodistro-master-custom-1/layers
    bitbake
    openembedded-core
    yocto-docs

Setting up bitbake configuration in
    [SNIP]/workspace/test-bbs/bitbake-builds/oe-nodistro-master-custom-1/build

New bitbake configuration from upstream is the same as the current one, no need to update it. 

test-bbs$ git -C bitbake-builds/oe-nodistro-master-custom-1/config log --oneline -1
0e10ea9 (HEAD -> main) Configuration at Wed Mar  4 19:38:25 2026

test-bbs$ git -C bitbake-builds/oe-nodistro-master-custom-1/config show HEAD
commit 0e10ea95801e6e41de02dd7062cbe9a1662ddcaa (HEAD -> main)
Author: bitbake-setup <bitbake-setup@not.set>
Date:   Wed Mar 4 19:38:25 2026 -0700

    Configuration at Wed Mar  4 19:38:25 2026
```

The note is also seen with `status`.

> Expected/working behavior

Using a configuration with a branch name as the revision, no spurious config updates are seen:
```
test-bbs$ ./bitbake/bin/bitbake-setup update
NOTE: Bitbake-setup is using [SNIP]/workspace/test-bbs/bitbake-builds as top directory.
NOTE: Reading configuration from local file
    oe-nodistro-custom.conf.json

Configuration in [SNIP]/workspace/test-bbs/bitbake-builds/oe-nodistro-master-custom-1 has not changed.

test-bbs$ git -C bitbake-builds/oe-nodistro-master-custom-1/config log --oneline -1
db24b0d (HEAD -> main) Configuration at Wed Mar  4 19:12:54 2026

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

Configuration in [SNIP]/workspace/test-bbs/bitbake-builds/oe-nodistro-master-custom-1 has not changed.

test-bbs$ git -C bitbake-builds/oe-nodistro-master-custom-1/config log --oneline -1
db24b0d (HEAD -> main) Configuration at Wed Mar  4 19:12:54 2026
```
Comment 1 Alexander Kanavin 2026-03-05 20:13:27 UTC
https://patchwork.yoctoproject.org/project/bitbake/list/?series=44071

Please test.
Comment 2 Clayton Casciato 2026-03-06 19:31:11 UTC
Hi, Alexander

This appears to resolve the unexpected behavior.

Using a new Setup, I tested the following revision changes:
fixed -> fixed -> branch -> equivalent fixed

Thank you!
Comment 3 Alexander Kanavin 2026-03-09 14:17:04 UTC
Hello Clayton,

thanks for testing. Can you also check the v2 please?

https://patchwork.yoctoproject.org/project/bitbake/list/?series=44205
Comment 4 Clayton Casciato 2026-03-09 15:41:51 UTC
v2 looks good.

Test sequence:
init with branch -> fixed -> fixed -> equivalent branch
Comment 5 Alexander Kanavin 2026-03-12 12:04:51 UTC
Merged into bitbake master. Thanks!