From 2b406a3174b8142b1ae00e6cff4af43317a78f94 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 16 Dec 2022 11:17:14 +0000 Subject: bitbake: codeparser/data: Add vardepsexclude support to module dependency code We need to be able to exclude dependencies from the python module dependency code. Add support for the vardepexclude flag for these. It only works from the configuration namespace rather than per recipe for efficiency. (Bitbake rev: 1aa672b01037fda4ca82f2c7e394783287c09ecd) Signed-off-by: Richard Purdie --- bitbake/lib/bb/codeparser.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bitbake/lib/bb/codeparser.py') diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py index c0b1d7966f..ecae7b0808 100644 --- a/bitbake/lib/bb/codeparser.py +++ b/bitbake/lib/bb/codeparser.py @@ -84,6 +84,12 @@ def add_module_functions(fn, functions, namespace): modulecode_deps[name] = [parser.references.copy(), execs, parser.var_execs.copy(), parser.contains.copy()] #bb.warn("%s: %s\nRefs:%s Execs: %s %s %s" % (name, src, parser.references, parser.execs, parser.var_execs, parser.contains)) +def update_module_dependencies(d): + for mod in modulecode_deps: + excludes = set((d.getVarFlag(mod, "vardepsexclude") or "").split()) + if excludes: + modulecode_deps[mod] = [modulecode_deps[mod][0] - excludes, modulecode_deps[mod][1] - excludes, modulecode_deps[mod][2] - excludes, modulecode_deps[mod][3]] + # A custom getstate/setstate using tuples is actually worth 15% cachesize by # avoiding duplication of the attribute names! class SetCache(object): -- cgit v1.2.3-54-g00ecf