diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-05-30 17:17:18 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 17:22:13 +0100 |
commit | 56c1ab18fcaf4ac245dcb412ed55e8e0af07883b (patch) | |
tree | 951c14fd99af0191b27aec3c62200fd314a54cf0 /lib/bb/data.py | |
parent | 99feb77c2de707f2d825566cf48371c48f450e3e (diff) | |
download | bitbake-contrib-56c1ab18fcaf4ac245dcb412ed55e8e0af07883b.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].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data.py')
-rw-r--r-- | lib/bb/data.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py index c0636e10e..e3ffefeb3 100644 --- a/lib/bb/data.py +++ b/lib/bb/data.py @@ -279,7 +279,12 @@ def build_dependencies(key, keys, shelldeps, vardepvals, d): deps = set() vardeps = d.getVarFlag(key, "vardeps", True) try: - value = d.getVar(key, False) + if key[-1] == ']': + vf = key[:-1].split('[') + value = d.getVarFlag(vf[0], vf[1], False) + else: + value = d.getVar(key, False) + if key in vardepvals: value = d.getVarFlag(key, "vardepvalue", True) elif d.getVarFlag(key, "func"): @@ -301,6 +306,19 @@ def build_dependencies(key, keys, shelldeps, vardepvals, d): parser = d.expandWithRefs(value, key) deps |= parser.references deps = deps | (keys & parser.execs) + + # Add varflags, assuming an exclusion list is set + varflagsexcl = d.getVar('BB_SIGNATURE_EXCLUDE_FLAGS', True) + if varflagsexcl: + varfdeps = [] + varflags = d.getVarFlags(key) + if varflags: + for f in varflags: + if f not in varflagsexcl: + varfdeps.append('%s[%s]' % (key, f)) + if varfdeps: + deps |= set(varfdeps) + deps |= set((vardeps or "").split()) deps -= set((d.getVarFlag(key, "vardepsexclude", True) or "").split()) except: |