bitbake: lib/bb/data: fix dependency handling for contains and multiple values
The code that determines variable dependencies uses the codeparser to find references to "contains" type operations e.g. bb.utils.contains(). That function can take multiple items to check, and all specified items have to be present. However this code didn't handle that - it assumed that only one item would be specified and thus it was treating the multiple items as a single item with spaces in between. Split the value and check if all words are present in order to determine whether the check is "set" or "unset". (Bitbake rev: 272f1245acdd4fb85cb78612aa03627a9c246d8f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
eff56e4f0d
commit
f217b65f12
|
@ -296,11 +296,13 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
|
||||||
newvalue = ""
|
newvalue = ""
|
||||||
for k in sorted(contains):
|
for k in sorted(contains):
|
||||||
l = (d.getVar(k) or "").split()
|
l = (d.getVar(k) or "").split()
|
||||||
for word in sorted(contains[k]):
|
for item in sorted(contains[k]):
|
||||||
if word in l:
|
for word in item.split():
|
||||||
newvalue += "\n%s{%s} = Set" % (k, word)
|
if not word in l:
|
||||||
|
newvalue += "\n%s{%s} = Unset" % (k, item)
|
||||||
|
break
|
||||||
else:
|
else:
|
||||||
newvalue += "\n%s{%s} = Unset" % (k, word)
|
newvalue += "\n%s{%s} = Set" % (k, item)
|
||||||
if not newvalue:
|
if not newvalue:
|
||||||
return value
|
return value
|
||||||
if not value:
|
if not value:
|
||||||
|
|
Loading…
Reference in New Issue