mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
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:
@@ -39,6 +39,13 @@ def base_conditional(variable, checkvalue, truevalue, falsevalue, d):
|
|||||||
else:
|
else:
|
||||||
return falsevalue
|
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)} "
|
DEPENDS_prepend="${@base_dep_prepend(d)} "
|
||||||
|
|
||||||
def base_set_filespath(path, d):
|
def base_set_filespath(path, d):
|
||||||
|
|||||||
Reference in New Issue
Block a user