summaryrefslogtreecommitdiff
path: root/meta/lib
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/utils.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index f6d4142c1..5a63ed3c3 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -35,16 +35,15 @@ def version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
return falsevalue
def contains(variable, checkvalues, truevalue, falsevalue, d):
- val = bb.data.getVar(variable,d,1)
+ val = d.getVar(variable, True)
if not val:
return falsevalue
- matches = 0
- if type(checkvalues).__name__ == "str":
- checkvalues = [checkvalues]
- for value in checkvalues:
- if val.find(value) != -1:
- matches = matches + 1
- if matches == len(checkvalues):
+ val = set(val.split())
+ if isinstance(checkvalues, basestring):
+ checkvalues = set(checkvalues.split())
+ else:
+ checkvalues = set(checkvalues)
+ if checkvalues.issubset(val):
return truevalue
return falsevalue