poky/bitbake/lib
Richard Purdie 9a25a38ffe bitbake: codeparser: Allow code visitor expressions to be declared in metadata
Allow the metadata to define code visitor expressions which mean that
custom dependencies can be handled in function libraries.

An example is the qa.handle_error function in OE which can set something
like:

"""
def handle_error_visitorcode(name, args):
    execs = set()
    contains = {}
    warn = None
    if isinstance(args[0], ast.Constant) and isinstance(args[0].value, str):
        for i in ["ERROR_QA", "WARN_QA"]:
            if i not in contains:
                contains[i] = set()
        contains[i].add(args[0].value)
    else:
        warn = args[0]
        execs.add(name)
    return contains, execs, warn

handle_error.visitorcode = handle_error_visitorcode
"""

Meaning that it can have contains optimisations on ERROR and WARN_QA
instead of hard dependencies.

One drawback to this solution is the parsing order. Functions with
visitorcode need to be defined before anything else references them
or the visitor code will not function for the earlier references.

(Bitbake rev: 5bd0c65c217394cde4c8e382eba6cf7f4b909c97)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-29 21:58:19 +01:00
..
bb bitbake: codeparser: Allow code visitor expressions to be declared in metadata 2024-08-29 21:58:19 +01:00
bblayers bitbake: bitbake-layers: adapt force option to not use tinfoil 2024-05-08 14:51:43 +01:00
bs4 bitbake: lib/bs4: Avoid soupsieve warning 2024-05-31 13:09:54 +01:00
hashserv bitbake: hashserv: client: Fix changing stream modes 2024-05-31 16:56:25 +01:00
layerindexlib bitbake: layerindexlib: fix missing layer branch backtrace 2024-02-27 11:36:38 +00:00
ply bitbake: utils/ply: Update md5 to better report errors with hashlib 2022-10-26 12:32:08 +01:00
progressbar bitbake: bitbake: progressbar: accept value over initial maxval 2024-02-23 14:34:05 +00:00
prserv bitbake: prserv: add bitbake selftests 2024-05-21 14:23:43 +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: test_project_page: fix failing test_single_layer_page 2024-06-12 21:15:50 +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