poky/bitbake/lib/bb
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
..
asyncrpc bitbake: asyncrpc: Handle websockets exceptions 2025-01-11 18:35:01 +00:00
compress bitbake: bb/compress: use lz4 instead of lz4c 2024-11-05 11:17:17 +00:00
fetch2 bitbake: fetch2/git: allow overriding default unpack directory with a variable 2025-06-20 12:03:37 +01:00
parse bitbake: parse/ast: add support for 'built-in' fragments 2025-06-20 12:03:37 +01:00
pysh bitbake: pyshyacc: allow double COMMA statements 2020-07-12 11:53:00 +01:00
server bitbake: cooker: use enum for cooker state to improve readability 2024-12-06 23:33:54 +00:00
tests bitbake: tests/fetch: Add test case to check shallow cloning using PREMIRRORS 2025-05-28 12:37:02 +01:00
ui bitbake: knotty: pass failed task logs through the log infrastructure 2025-05-16 07:13:18 +01:00
__init__.py bitbake: bitbake: Bump to version 2.15.0 2025-06-16 22:23:18 +01:00
acl.py bitbake: lib: Remove double imports 2025-02-27 15:12:55 +00:00
build.py bitbake: lib/bb/build: remove mention of OE_EXTRA_IMPORTS 2025-02-27 15:21:10 +00:00
cache_extra.py bitbake: bitbake: Strip old editor directives from file headers 2019-05-04 10:44:10 +01:00
cache.py bitbake: cooker/cache: Drop mc 'default' string value 2025-01-25 11:30:51 +00:00
checksum.py bitbake: checksum/fetch2: Switch from persist_data to a standard cache file 2024-10-09 13:04:30 +01:00
codeparser.py bitbake: codeparser: Add function decorators for vardeps 2025-04-10 11:07:38 +01:00
command.py bitbake: command: Fix command complete event ordering 2025-03-11 10:53:13 +00:00
cooker.py bitbake: cooker: Add debug for parsing being complete 2025-03-11 10:53:13 +00:00
cookerdata.py bitbake: cooker/cache: Drop mc 'default' string value 2025-01-25 11:30:51 +00:00
COW.py bitbake: COW: Fix hardcoded magic numbers and work with python 3.13 2024-10-09 13:04:30 +01:00
daemonize.py bitbake: bitbake: Add copyright headers where missing 2022-08-12 11:49:29 +01:00
data_smart.py bitbake: data_smart: Ensure module dependency changes invalidate the base config cache 2025-03-13 21:21:04 +00:00
data.py bitbake: codeparser/data: Ensure module function contents changing is accounted for 2024-07-01 13:53:23 +01:00
event.py bitbake: event: Add event for deferred inherits 2025-06-16 22:23:18 +01:00
main.py bitbake: bitbake: improve descriptions of '-S printdiff' 2024-03-22 16:26:45 +00:00
methodpool.py bitbake: bitbake: Strip old editor directives from file headers 2019-05-04 10:44:10 +01:00
monitordisk.py bitbake: Fix disk space monitoring on cephfs 2023-08-25 07:55:34 +01:00
msg.py bitbake: Remove custom exception backtrace formatting 2024-11-28 00:06:24 +00:00
namedtuple_with_abc.py bitbake: lib: fix most undefined code picked up by pylint 2020-08-25 18:14:53 +01:00
process.py bitbake: bitbake: Add copyright headers where missing 2022-08-12 11:49:29 +01:00
progress.py bitbake: progress: Fix typo "wherever" 2022-02-20 16:45:25 +00:00
providers.py bitbake: providers: use local variable for packages_dynamic pattern 2022-04-19 14:15:09 +01:00
remotedata.py bitbake: tinfoil: Simplify remote datastore connections 2020-03-24 22:01:03 +00:00
runqueue.py bitbake: runqueue: Optimize loop in scenequeue data construction 2025-05-27 09:01:37 +01:00
siggen.py bitbake: siggen: Fix rare file-checksum hash issue 2024-09-05 21:49:17 +01:00
taskdata.py bitbake: lib/bb: Replace "abort" usage in task handling 2022-02-21 23:37:26 +00:00
tinfoil.py bitbake: tinfoil: Track data during finalizeData 2025-03-18 11:03:17 +00:00
utils.py bitbake: utils: format and improve docstrings 2025-04-24 11:53:00 +01:00
xattr.py bitbake: lib/bb: Add xattr and acl libraries 2023-08-24 16:49:38 +01:00