summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-04-03 11:19:03 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-05 23:19:17 +0100
commitf217b65f124fd81c15d48e2381bf2f575b96da0c (patch)
treed9a4c45e50ce09690089498cb304f3e6c7de2e84 /bitbake
parenteff56e4f0d59b1d965a68e4f009b7f07717b7edd (diff)
downloadpoky-f217b65f124fd81c15d48e2381bf2f575b96da0c.tar.gz
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>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/data.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index a85cb3abff..0403754dee 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -296,11 +296,13 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
296 newvalue = "" 296 newvalue = ""
297 for k in sorted(contains): 297 for k in sorted(contains):
298 l = (d.getVar(k) or "").split() 298 l = (d.getVar(k) or "").split()
299 for word in sorted(contains[k]): 299 for item in sorted(contains[k]):
300 if word in l: 300 for word in item.split():
301 newvalue += "\n%s{%s} = Set" % (k, word) 301 if not word in l:
302 newvalue += "\n%s{%s} = Unset" % (k, item)
303 break
302 else: 304 else:
303 newvalue += "\n%s{%s} = Unset" % (k, word) 305 newvalue += "\n%s{%s} = Set" % (k, item)
304 if not newvalue: 306 if not newvalue:
305 return value 307 return value
306 if not value: 308 if not value: