summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-05-30 17:17:18 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 17:23:32 +0100
commit534f31903b98de9298c69f4de4d6cd1c51d394d6 (patch)
treebf9ddc40879ce0101545dee3365edc1561ca5471 /bitbake/lib/bb/data.py
parent43551f513da4c6dc81043099f9e8aa0211eefd8e (diff)
downloadpoky-534f31903b98de9298c69f4de4d6cd1c51d394d6.tar.gz
bitbake: include varflags in checksums
Add a dependency to each variable on a filtered list of its varflags. This is intended to catch things such as SRC_URI checksums, varflags controlling extra functionality from classes (e.g. the recently updated update-alternatives class in OE-Core), etc. and ensure their values influence the sstate checksums. There is an exclusion list which needs to be set via bitbake.conf (BB_SIGNATURE_EXCLUDE_FLAGS), if this is not set then the functionality is disabled. The existing vardepsexclude mechanism can also be used to exclude undesired varflags, but they must be fully specified, e.g.: do_patch[vardepsexclude] += "do_patch[someflag]" Implements [YOCTO #2517]. (Bitbake rev: 56c1ab18fcaf4ac245dcb412ed55e8e0af07883b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data.py')
-rw-r--r--bitbake/lib/bb/data.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index c0636e10e8..e3ffefeb36 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -279,7 +279,12 @@ def build_dependencies(key, keys, shelldeps, vardepvals, d):
279 deps = set() 279 deps = set()
280 vardeps = d.getVarFlag(key, "vardeps", True) 280 vardeps = d.getVarFlag(key, "vardeps", True)
281 try: 281 try:
282 value = d.getVar(key, False) 282 if key[-1] == ']':
283 vf = key[:-1].split('[')
284 value = d.getVarFlag(vf[0], vf[1], False)
285 else:
286 value = d.getVar(key, False)
287
283 if key in vardepvals: 288 if key in vardepvals:
284 value = d.getVarFlag(key, "vardepvalue", True) 289 value = d.getVarFlag(key, "vardepvalue", True)
285 elif d.getVarFlag(key, "func"): 290 elif d.getVarFlag(key, "func"):
@@ -301,6 +306,19 @@ def build_dependencies(key, keys, shelldeps, vardepvals, d):
301 parser = d.expandWithRefs(value, key) 306 parser = d.expandWithRefs(value, key)
302 deps |= parser.references 307 deps |= parser.references
303 deps = deps | (keys & parser.execs) 308 deps = deps | (keys & parser.execs)
309
310 # Add varflags, assuming an exclusion list is set
311 varflagsexcl = d.getVar('BB_SIGNATURE_EXCLUDE_FLAGS', True)
312 if varflagsexcl:
313 varfdeps = []
314 varflags = d.getVarFlags(key)
315 if varflags:
316 for f in varflags:
317 if f not in varflagsexcl:
318 varfdeps.append('%s[%s]' % (key, f))
319 if varfdeps:
320 deps |= set(varfdeps)
321
304 deps |= set((vardeps or "").split()) 322 deps |= set((vardeps or "").split())
305 deps -= set((d.getVarFlag(key, "vardepsexclude", True) or "").split()) 323 deps -= set((d.getVarFlag(key, "vardepsexclude", True) or "").split())
306 except: 324 except: