diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-03 16:11:02 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-09 12:48:47 +0100 |
| commit | 8cf9a46970cb09ce0c1ee38d5f3916fb79e19057 (patch) | |
| tree | 16ea315a26cb9fe267246bde509776c876956326 | |
| parent | 8f3b2a4d46ce59b72a85e20d1fc0a8b1309de922 (diff) | |
| download | poky-8cf9a46970cb09ce0c1ee38d5f3916fb79e19057.tar.gz | |
bitbake: ast: Fix fragment behaviour with overrides
Imagine a machine fragment machine/A and a configuration which sets:
MACHINE = "B"
MACHINE:forcevariable = "C"
As I understand it, the fragment behaviour was intended to replace the
MACHINE = "B", so the override would still be active. The current code
replaces all variable overrides.
parsing=True, switches to the other behaviour, which I believe was the
design intent and the behaviour users would expect.
This is useful to allow test configurations to override a MACHINE setting
without change the fragments which would complicate the test code.
(Bitbake rev: f65bc6aaf4c11bc7e566c895209c093627a3015b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | bitbake/lib/bb/parse/ast.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index 49a0788038..cb06e89179 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py | |||
| @@ -364,7 +364,8 @@ class AddFragmentsNode(AstNode): | |||
| 364 | def check_and_set_builtin_fragment(fragment, data, builtin_fragments): | 364 | def check_and_set_builtin_fragment(fragment, data, builtin_fragments): |
| 365 | prefix, value = fragment.split('/', 1) | 365 | prefix, value = fragment.split('/', 1) |
| 366 | if prefix in builtin_fragments.keys(): | 366 | if prefix in builtin_fragments.keys(): |
| 367 | data.setVar(builtin_fragments[prefix], value) | 367 | # parsing=True since we want to emulate X=Y and allow X:override=Z to continue to exist |
| 368 | data.setVar(builtin_fragments[prefix], value, parsing=True) | ||
| 368 | return True | 369 | return True |
| 369 | return False | 370 | return False |
| 370 | 371 | ||
