[bitbake-devel] data: Ensure emit_func honours vardeps flag

Submitted by Richard Purdie on Dec. 14, 2012, 4:25 p.m.

Details

Message ID 1355502352.32519.28.camel@ted
State New
Headers show

Commit Message

Richard Purdie Dec. 14, 2012, 4:25 p.m.
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]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index dc5a425..478a482 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -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

Comments

Chris Larson Dec. 14, 2012, 9:14 p.m.
On Fri, Dec 14, 2012 at 9:25 AM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> 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]
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>

Looks reasonable to me, thanks.

Acked-by: Christopher Larson <chris_larson@mentor.com>