diff options
author | Richard Purdie <richard@openedhand.com> | 2006-07-24 09:22:17 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-07-24 09:22:17 +0000 |
commit | 3e472bb56da70d183073ef6a4f0e6f8d8ab31165 (patch) | |
tree | d892ad706b56cc91188c53230df9c0592a93e174 | |
parent | 2ca73b57dc7df958ce80bfa3c2e3dc3fc18950b5 (diff) | |
download | openembedded-core-3e472bb56da70d183073ef6a4f0e6f8d8ab31165.tar.gz openembedded-core-3e472bb56da70d183073ef6a4f0e6f8d8ab31165.tar.bz2 openembedded-core-3e472bb56da70d183073ef6a4f0e6f8d8ab31165.tar.xz openembedded-core-3e472bb56da70d183073ef6a4f0e6f8d8ab31165.zip |
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
-rw-r--r-- | meta/classes/base.bbclass | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 8467ebddc..6f23a846f 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -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): |