Bug 16060 - Behavior change: projects setup with bitbake-setup no longer respects MACHINE=xxx env settings
Summary: Behavior change: projects setup with bitbake-setup no longer respects MACHINE...
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 5.3 M4
Assignee: Chen Qi
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2025-11-12 05:48 UTC by Chen Qi
Modified: 2025-11-21 02:08 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chen Qi 2025-11-12 05:48:24 UTC
Previously, I usually do 'MACHINE=xxx bitbake <pkg>' when doing build test for package upgrades.

Now with bitbake-setup, as the toolcfg.conf contains fragements such as:
OE_FRAGMENTS += "distro/poky machine/qemux86-64"
Using MACHINE=xxx in env does not work anymore.

What's worse, even if I put MACHINE = "qemuarm64" in local.conf, it still does take effect.

Should we change internal fragement settings to be like "?=" instead of "="?
Comment 1 Chen Qi 2025-11-12 06:21:58 UTC
I submitted a patch:
https://lists.openembedded.org/g/bitbake-devel/message/18343
Comment 2 Richard Purdie 2025-11-13 15:49:47 UTC
We think the best way to handle this is to error if a fragment is set and there is also a value for the variable already set (from the environment or the conf files). We could recommend the user unset the fragment with:

bitbake-config-build disable-fragment
Comment 4 Chen Qi 2025-11-14 09:50:02 UTC
@Alex & @Richard,

The above patch has two things that I don't feel good:
1) The env pass-through mechanism is used to avoid 'bitbake-config-build' error out.
2) The '??=' is OK, but '?=' still triggers an error.

If you have some suggestion, please let me know.