Skip to contentSkip to conversation

data: Ensure emit_func honours vardeps flag

PATCH In review Richard Purdie 2 participants 2 messages Dec 14, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 data: Ensure emit_func honours vardeps flag

Currently, calling a shell function using exec_func may result in dependent functions being missing, if the shell parser can't detect the dependency, even if it was specified with the vardeps flag.

This patch ensures the function looks at the flag and considers it when deciding which other functions need to be output.

[YOCTO #3561]

---

bitbake/lib/bb/data.py +1 -0
index dc5a425..478a482 100644
@@ -260,6 +260,7 @@ def emit_func(func, o=sys.__stdout__, d = init()):
 
     emit_var(func, o, d, False) and o.write('\n')
     newdeps = bb.codeparser.ShellParser(func, logger).parse_shell(d.getVar(func, True))
+    newdeps |= set((d.getVarFlag(func, "vardeps", True) or "").split())
     seen = set()
     while newdeps:
         deps = newdeps
Acked-by Christopher Larson on v1 1/1
#1 lore raw
Quoted 11 lines · Richard Purdie

Currently, calling a shell function using exec_func may result in dependent functions being missing, if the shell parser can't detect the dependency, even if it was specified with the vardeps flag.

This patch ensures the function looks at the flag and considers it when deciding which other functions need to be output.

[YOCTO #3561]

Looks reasonable to me, thanks.

Signature · 1 line
Christopher Larson