diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-03 16:09:32 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-04 22:03:48 +0000 |
commit | 707cdcf9050397ce48c81a7225ca01f618b9a87a (patch) | |
tree | 2a661d80f37581a20a24d90983712a25649b5d0d /bitbake | |
parent | 82f9c2bcff3e977beefde6048d2ba32d17acbbd0 (diff) | |
download | ast2050-yocto-poky-707cdcf9050397ce48c81a7225ca01f618b9a87a.zip ast2050-yocto-poky-707cdcf9050397ce48c81a7225ca01f618b9a87a.tar.gz |
bitbake: data: Account for pre/postfunc functions when calculating dependencies
pre/postfuncs were not being added to checksums. This meant that when reconfiguration
occurred, tasks were not always being rerun when they should. This include
sstate functions as well as systemd's do_install function in the OE metadata.
With the addition of postfuncs, its possible a shell task can have a python
pre/postfunc so we have to guard against this when generating shell output
in emit_func.
(Bitbake rev: b84d010144de687667cf855ddcb41c9b863c236e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/data.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py index 5840803..a56b79c 100644 --- a/bitbake/lib/bb/data.py +++ b/bitbake/lib/bb/data.py @@ -275,7 +275,7 @@ def emit_func(func, o=sys.__stdout__, d = init()): seen |= deps newdeps = set() for dep in deps: - if d.getVarFlag(dep, "func"): + if d.getVarFlag(dep, "func") and not d.getVarFlag(dep, "python"): emit_var(dep, o, d, False) and o.write('\n') newdeps |= bb.codeparser.ShellParser(dep, logger).parse_shell(d.getVar(dep, True)) newdeps |= set((d.getVarFlag(dep, "vardeps", True) or "").split()) @@ -295,7 +295,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d): deps |= parser.references deps = deps | (keys & parser.execs) return deps, value - varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude"]) or {} + varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude", "postfuncs", "prefuncs"]) or {} vardeps = varflags.get("vardeps") value = d.getVar(key, False) @@ -332,6 +332,10 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d): deps = deps | shelldeps if vardeps is None: parser.log.flush() + if "prefuncs" in varflags: + deps = deps | set(varflags["prefuncs"].split()) + if "postfuncs" in varflags: + deps = deps | set(varflags["postfuncs"].split()) deps = deps | parsedvar.references deps = deps | (keys & parser.execs) | (keys & parsedvar.execs) value = handle_contains(value, parsedvar.contains, d) |