summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2014-03-03 16:54:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-06 17:30:01 +0000
commitf803bf8cfefafcbe212442e66b301ccd9c5aa2a5 (patch)
tree07abe5d58180a379c4affe036c6d842a23537d8c
parent8239264753977bd06ad5b1b574245d3842af489b (diff)
downloadbitbake-contrib-f803bf8cfefafcbe212442e66b301ccd9c5aa2a5.tar.gz
data: add vardepvalueexclude varflag
On rare occasions it's useful to be able to exclude a part of a variable's value from the variable's signature; for example if you want to add an item to a list sometimes and not have the signature of the variable change depending on whether the item is in the list or not. The initial intended use case for this in OpenEmbedded is to allow adding a function to SSTATEPOSTINSTFUNCS in buildhistory.bbclass and not have that change any task signatures (so adding and removing INHERIT += "buildhistory" won't lead to any rebuilds). Part of the fix for [YOCTO #5897]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/data.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py
index a56b79cdf..db938be1e 100644
--- a/lib/bb/data.py
+++ b/lib/bb/data.py
@@ -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", "postfuncs", "prefuncs"]) or {}
+ varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude", "vardepvalueexclude", "postfuncs", "prefuncs"]) or {}
vardeps = varflags.get("vardeps")
value = d.getVar(key, False)
@@ -345,6 +345,12 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
deps = deps | (keys & parser.execs)
value = handle_contains(value, parser.contains, d)
+ if "vardepvalueexclude" in varflags:
+ exclude = varflags.get("vardepvalueexclude")
+ for excl in exclude.split('|'):
+ if excl:
+ value = value.replace(excl, '')
+
# Add varflags, assuming an exclusion list is set
if varflagsexcl:
varfdeps = []