diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-16 11:17:14 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-17 08:52:28 +0000 |
commit | 2b406a3174b8142b1ae00e6cff4af43317a78f94 (patch) | |
tree | a7f9d08972f39de876b921037a83fe67479984b8 /bitbake | |
parent | f3bcd3c9a91f6212c30b9c778c11f3c8a9f6f1d4 (diff) | |
download | poky-2b406a3174b8142b1ae00e6cff4af43317a78f94.tar.gz |
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/codeparser.py | 6 | ||||
-rw-r--r-- | bitbake/lib/bb/cookerdata.py | 1 |
2 files changed, 7 insertions, 0 deletions
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): | |||
84 | modulecode_deps[name] = [parser.references.copy(), execs, parser.var_execs.copy(), parser.contains.copy()] | 84 | modulecode_deps[name] = [parser.references.copy(), execs, parser.var_execs.copy(), parser.contains.copy()] |
85 | #bb.warn("%s: %s\nRefs:%s Execs: %s %s %s" % (name, src, parser.references, parser.execs, parser.var_execs, parser.contains)) | 85 | #bb.warn("%s: %s\nRefs:%s Execs: %s %s %s" % (name, src, parser.references, parser.execs, parser.var_execs, parser.contains)) |
86 | 86 | ||
87 | def update_module_dependencies(d): | ||
88 | for mod in modulecode_deps: | ||
89 | excludes = set((d.getVarFlag(mod, "vardepsexclude") or "").split()) | ||
90 | if excludes: | ||
91 | modulecode_deps[mod] = [modulecode_deps[mod][0] - excludes, modulecode_deps[mod][1] - excludes, modulecode_deps[mod][2] - excludes, modulecode_deps[mod][3]] | ||
92 | |||
87 | # A custom getstate/setstate using tuples is actually worth 15% cachesize by | 93 | # A custom getstate/setstate using tuples is actually worth 15% cachesize by |
88 | # avoiding duplication of the attribute names! | 94 | # avoiding duplication of the attribute names! |
89 | class SetCache(object): | 95 | class SetCache(object): |
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index 59ecbec69d..650ae05ec9 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py | |||
@@ -311,6 +311,7 @@ class CookerDataBuilder(object): | |||
311 | logger.exception("Error parsing configuration files") | 311 | logger.exception("Error parsing configuration files") |
312 | raise bb.BBHandledException() | 312 | raise bb.BBHandledException() |
313 | 313 | ||
314 | bb.codeparser.update_module_dependencies(self.data) | ||
314 | 315 | ||
315 | # Handle obsolete variable names | 316 | # Handle obsolete variable names |
316 | d = self.data | 317 | d = self.data |