summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
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:31:11 +0000
commit003d3170edaa9472ee46111caa901ac7ddf9321c (patch)
tree756d2f888dadc196479a85584339ba05ad3ec2b0 /bitbake/lib
parenta01af0202558e6ed9d16590b3a8d1dd1b95c0374 (diff)
downloadpoky-003d3170edaa9472ee46111caa901ac7ddf9321c.tar.gz
bitbake: 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]. (Bitbake rev: f803bf8cfefafcbe212442e66b301ccd9c5aa2a5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/data.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index a56b79cdf1..db938be1e6 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -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", "postfuncs", "prefuncs"]) or {} 298 varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude", "vardepvalueexclude", "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
@@ -345,6 +345,12 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
345 deps = deps | (keys & parser.execs) 345 deps = deps | (keys & parser.execs)
346 value = handle_contains(value, parser.contains, d) 346 value = handle_contains(value, parser.contains, d)
347 347
348 if "vardepvalueexclude" in varflags:
349 exclude = varflags.get("vardepvalueexclude")
350 for excl in exclude.split('|'):
351 if excl:
352 value = value.replace(excl, '')
353
348 # Add varflags, assuming an exclusion list is set 354 # Add varflags, assuming an exclusion list is set
349 if varflagsexcl: 355 if varflagsexcl:
350 varfdeps = [] 356 varfdeps = []