diff mbox series

[bitbake-devel] codeparser: Allow vardeps for python functions

Message ID 20250331185426.316386-1-JPEWhacker@gmail.com
State New
Headers show
Series [bitbake-devel] codeparser: Allow vardeps for python functions | expand

Commit Message

Joshua Watt March 31, 2025, 6:54 p.m. UTC
Adds support for python function to include [vardeps] task flags

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 bitbake/lib/bb/codeparser.py | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py
index 4bc6adbe459..e02776d8e1b 100644
--- a/bitbake/lib/bb/codeparser.py
+++ b/bitbake/lib/bb/codeparser.py
@@ -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):