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-03 17:51:38 +0100 |
| commit | e7cfd7d7a0fa3d85cb103c1a22066cb3e623d1fd (patch) | |
| tree | 92499244fb0978e42e23b2396175401911945d0d | |
| parent | e02cb6cbb8c57999624785d72d42cea87e0ec9e7 (diff) | |
| download | poky-e7cfd7d7a0fa3d85cb103c1a22066cb3e623d1fd.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: 6b4882a55567d440713ee34d81810167cd958d56)
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 3250211e60..2a98809fa5 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py | |||
| @@ -363,7 +363,8 @@ class AddFragmentsNode(AstNode): | |||
| 363 | def check_and_set_builtin_fragment(fragment, data, builtin_fragments): | 363 | def check_and_set_builtin_fragment(fragment, data, builtin_fragments): |
| 364 | prefix, value = fragment.split('/', 1) | 364 | prefix, value = fragment.split('/', 1) |
| 365 | if prefix in builtin_fragments.keys(): | 365 | if prefix in builtin_fragments.keys(): |
| 366 | data.setVar(builtin_fragments[prefix], value) | 366 | # parsing=True since we want to emulate X=Y and allow X:override=Z to continue to exist |
| 367 | data.setVar(builtin_fragments[prefix], value, parsing=True) | ||
| 367 | return True | 368 | return True |
| 368 | return False | 369 | return False |
| 369 | 370 | ||
