summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-03 16:09:32 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-04 22:03:48 +0000
commit707cdcf9050397ce48c81a7225ca01f618b9a87a (patch)
tree2a661d80f37581a20a24d90983712a25649b5d0d /bitbake
parent82f9c2bcff3e977beefde6048d2ba32d17acbbd0 (diff)
downloadpoky-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.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 58408036dd..a56b79cdf1 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()):
275 seen |= deps 275 seen |= deps
276 newdeps = set() 276 newdeps = set()
277 for dep in deps: 277 for dep in deps:
278 if d.getVarFlag(dep, "func"): 278 if d.getVarFlag(dep, "func") and not d.getVarFlag(dep, "python"):
279 emit_var(dep, o, d, False) and o.write('\n') 279 emit_var(dep, o, d, False) and o.write('\n')
280 newdeps |= bb.codeparser.ShellParser(dep, logger).parse_shell(d.getVar(dep, True)) 280 newdeps |= bb.codeparser.ShellParser(dep, logger).parse_shell(d.getVar(dep, True))
281 newdeps |= set((d.getVarFlag(dep, "vardeps", True) or "").split()) 281 newdeps |= set((d.getVarFlag(dep, "vardeps", True) or "").split())
@@ -295,7 +295,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
295 deps |= parser.references 295 deps |= parser.references
296 deps = deps | (keys & parser.execs) 296 deps = deps | (keys & parser.execs)
297 return deps, value 297 return deps, value
298 varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude"]) or {} 298 varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude", "postfuncs", "prefuncs"]) or {}
299 vardeps = varflags.get("vardeps") 299 vardeps = varflags.get("vardeps")
300 value = d.getVar(key, False) 300 value = d.getVar(key, False)
301 301
@@ -332,6 +332,10 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
332 deps = deps | shelldeps 332 deps = deps | shelldeps
333 if vardeps is None: 333 if vardeps is None:
334 parser.log.flush() 334 parser.log.flush()
335 if "prefuncs" in varflags:
336 deps = deps | set(varflags["prefuncs"].split())
337 if "postfuncs" in varflags:
338 deps = deps | set(varflags["postfuncs"].split())
335 deps = deps | parsedvar.references 339 deps = deps | parsedvar.references
336 deps = deps | (keys & parser.execs) | (keys & parsedvar.execs) 340 deps = deps | (keys & parser.execs) | (keys & parsedvar.execs)
337 value = handle_contains(value, parsedvar.contains, d) 341 value = handle_contains(value, parsedvar.contains, d)