Skip to contentSkip to conversation

codeparser: Allow vardeps for python functions

PATCH New Joshua Watt 1 participant 1 message Mar 31, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 codeparser: Allow vardeps for python functions

Adds support for python function to include [vardeps] task flags

---
 bitbake/lib/bb/codeparser.py | 4 ++++
 1 file changed, 4 insertions(+)
bitbake/lib/bb/codeparser.py +4 -0
index 4bc6adbe459..e02776d8e1b 100644
@@ -107,6 +107,10 @@ def update_module_dependencies(d):
         if excludes:
             modulecode_deps[mod] = [modulecode_deps[mod][0] - excludes, modulecode_deps[mod][1] - excludes, modulecode_deps[mod][2] - excludes, modulecode_deps[mod][3], modulecode_deps[mod][4], modulecode_deps[mod][5]]
 
+        deps = set((d.getVarFlag(mod, "vardeps") or "").split())
+        if deps:
+            modulecode_deps[mod] = [modulecode_deps[mod][0] | deps, modulecode_deps[mod][1] | deps, modulecode_deps[mod][2] | deps, modulecode_deps[mod][3], modulecode_deps[mod][4], modulecode_deps[mod][5]]
+
 # A custom getstate/setstate using tuples is actually worth 15% cachesize by
 # avoiding duplication of the attribute names!
 class SetCache(object):
Signature · 1 line
2.49.0