summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/utils.py')
-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 f6d4142c12..5a63ed3c3b 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):
35 return falsevalue 35 return falsevalue
36 36
37def contains(variable, checkvalues, truevalue, falsevalue, d): 37def contains(variable, checkvalues, truevalue, falsevalue, d):
38 val = bb.data.getVar(variable,d,1) 38 val = d.getVar(variable, True)
39 if not val: 39 if not val:
40 return falsevalue 40 return falsevalue
41 matches = 0 41 val = set(val.split())
42 if type(checkvalues).__name__ == "str": 42 if isinstance(checkvalues, basestring):
43 checkvalues = [checkvalues] 43 checkvalues = set(checkvalues.split())
44 for value in checkvalues: 44 else:
45 if val.find(value) != -1: 45 checkvalues = set(checkvalues)
46 matches = matches + 1 46 if checkvalues.issubset(val):
47 if matches == len(checkvalues):
48 return truevalue 47 return truevalue
49 return falsevalue 48 return falsevalue
50 49