poky/bitbake/lib
Alexander Kanavin 941ac7d256 bitbake: parse/ast: add support for 'built-in' fragments
When reviewing proposed fragments to add settings for DISTRO and MACHINE,
RP noted that such fragments only add clutter and overhead, and there's
no need to maintain them as separate files.

Rather when bitbake sees 'fragmentvar/fragmentvalue' it can expand that into
FRAGMENTVAR = "fragmentvalue".

To achieve that, 'addfragments' directive is extended with a parameter
that sets the name of the variable that holds definitions of such
built-in fragments, for example like this:

"machine:MACHINE distro:DISTRO"

Then each enabled fragment name is matched against these definitions and the
respective variable is set, e.g. 'machine/qemuarm' would match
'machine:MACHINE' and result in MACHINE set to 'qemuarm'.

This happens before any fragment files are looked up on disk,
and no such lookup happens if there was a match, which should prevent
possible misuse of the feature. So the builtin fragment definition
is also an allowlist for them.

Please also see the patches for oe-core that show an application of the feature.

(Bitbake rev: 3b9d7bea915dc7f10e845854f1dae325743f9456)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:03:37 +01:00
..
bb bitbake: parse/ast: add support for 'built-in' fragments 2025-06-20 12:03:37 +01:00
bblayers bitbake: Revert "bblayers/query: Fix using "removeprefix" string method" 2025-03-24 17:29:55 +00:00
bs4 bitbake: lib: Remove double imports 2025-02-27 15:12:55 +00:00
hashserv bitbake: hashserv: Fix deprecation warning about sqlite adapter 2025-05-19 17:55:50 +01:00
layerindexlib bitbake: layerindexlib: fix missing layer branch backtrace 2024-02-27 11:36:38 +00:00
ply bitbake: lib: Remove double imports 2025-02-27 15:12:55 +00:00
progressbar bitbake: bitbake: progressbar: accept value over initial maxval 2024-02-23 14:34:05 +00:00
prserv bitbake: prserv: increment 9 to 10 correctly 2024-09-12 16:17:20 +01:00
simplediff bitbake: lib/bb/siggen: show word-diff for single-line values containing spaces 2017-04-10 23:00:32 +01:00
toaster bitbake: toaster/tests/buildtest: Switch to new CDN 2025-05-29 17:28:54 +01:00
codegen.py bitbake: codegen: cleanup deprecated AST usages 2023-11-14 23:39:53 +00:00
pyinotify.py bitbake: pyinotify.py: Simplify identification of which event has occurred 2022-04-14 09:48:33 +01:00