summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/data.py')
-rw-r--r--bitbake/lib/bb/data.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index bdd1e79e24..3d2c6a4975 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -299,6 +299,21 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
299 vardeps = varflags.get("vardeps") 299 vardeps = varflags.get("vardeps")
300 value = d.getVar(key, False) 300 value = d.getVar(key, False)
301 301
302 def handle_contains(value, contains, d):
303 newvalue = ""
304 for k in contains:
305 l = (d.getVar(k, True) or "").split()
306 for word in contains[k]:
307 if word in l:
308 newvalue += "\n%s{%s} = Set" % (k, word)
309 else:
310 newvalue += "\n%s{%s} = Unset" % (k, word)
311 if not newvalue:
312 return value
313 if not value:
314 return newvalue
315 return value + newvalue
316
302 if "vardepvalue" in varflags: 317 if "vardepvalue" in varflags:
303 value = varflags.get("vardepvalue") 318 value = varflags.get("vardepvalue")
304 elif varflags.get("func"): 319 elif varflags.get("func"):
@@ -309,6 +324,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
309 logger.warn("Variable %s contains tabs, please remove these (%s)" % (key, d.getVar("FILE", True))) 324 logger.warn("Variable %s contains tabs, please remove these (%s)" % (key, d.getVar("FILE", True)))
310 parser.parse_python(parsedvar.value) 325 parser.parse_python(parsedvar.value)
311 deps = deps | parser.references 326 deps = deps | parser.references
327 value = handle_contains(value, parser.contains, d)
312 else: 328 else:
313 parsedvar = d.expandWithRefs(value, key) 329 parsedvar = d.expandWithRefs(value, key)
314 parser = bb.codeparser.ShellParser(key, logger) 330 parser = bb.codeparser.ShellParser(key, logger)
@@ -318,10 +334,12 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
318 parser.log.flush() 334 parser.log.flush()
319 deps = deps | parsedvar.references 335 deps = deps | parsedvar.references
320 deps = deps | (keys & parser.execs) | (keys & parsedvar.execs) 336 deps = deps | (keys & parser.execs) | (keys & parsedvar.execs)
337 value = handle_contains(value, parsedvar.contains, d)
321 else: 338 else:
322 parser = d.expandWithRefs(value, key) 339 parser = d.expandWithRefs(value, key)
323 deps |= parser.references 340 deps |= parser.references
324 deps = deps | (keys & parser.execs) 341 deps = deps | (keys & parser.execs)
342 value = handle_contains(value, parser.contains, d)
325 343
326 # Add varflags, assuming an exclusion list is set 344 # Add varflags, assuming an exclusion list is set
327 if varflagsexcl: 345 if varflagsexcl: