mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
Globally replace oe.utils.contains to bb.utils.contains
BitBake has the exact same code as oe.utils.contains so there's no reason to duplicate it. We now rely on the bb.utils.contains code for metadata. (From OE-Core rev: 93499ebc46547f5bf6dcecd5a786ead9f726de28) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
f11e9e295d
commit
08a38a7865
@@ -41,19 +41,6 @@ def version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
|
||||
else:
|
||||
return falsevalue
|
||||
|
||||
def contains(variable, checkvalues, truevalue, falsevalue, d):
|
||||
val = d.getVar(variable, True)
|
||||
if not val:
|
||||
return falsevalue
|
||||
val = set(val.split())
|
||||
if isinstance(checkvalues, basestring):
|
||||
checkvalues = set(checkvalues.split())
|
||||
else:
|
||||
checkvalues = set(checkvalues)
|
||||
if checkvalues.issubset(val):
|
||||
return truevalue
|
||||
return falsevalue
|
||||
|
||||
def both_contain(variable1, variable2, checkvalue, d):
|
||||
if d.getVar(variable1,1).find(checkvalue) != -1 and d.getVar(variable2,1).find(checkvalue) != -1:
|
||||
return checkvalue
|
||||
|
||||
Reference in New Issue
Block a user