Bug 16177 - devtool/varhistory does not track overrides if used to include a file
Summary: devtool/varhistory does not track overrides if used to include a file
Status: NEW
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium normal
Target Milestone: 6.1
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-02-24 14:10 UTC by Peter Hoyes
Modified: 2026-05-21 15:07 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Hoyes 2026-02-24 14:10:04 UTC
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 "devtool modify"
 * Populates the correct SRC_URI value with the patches in this branch when running "devtool finish"

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'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's, for this, e.g. "require:corstone1000 ${MACHINE_U-BOOT_REQUIRE}"...? This way the override context could (theoretically) be applied to everything in the required file.
Comment 1 Randy MacLeod 2026-02-26 15:39:01 UTC
Ross, Peter, 

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