base.bbclass: Add base_contains function - Can be used to check if a string is present in a variable.

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@547 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie
2006-07-24 09:22:17 +00:00
parent 2ca73b57dc
commit 3e472bb56d

View File

@@ -39,6 +39,13 @@ def base_conditional(variable, checkvalue, truevalue, falsevalue, d):
else:
return falsevalue
def base_contains(variable, checkvalue, truevalue, falsevalue, d):
import bb
if bb.data.getVar(variable,d,1).find(checkvalue) != -1:
return truevalue
else:
return falsevalue
DEPENDS_prepend="${@base_dep_prepend(d)} "
def base_set_filespath(path, d):