]> code.ossystems Code Review - openembedded-core.git/commitdiff
base.bbclass: Add base_both_contains function for use in task files
authorRichard Purdie <richard@openedhand.com>
Wed, 26 Jul 2006 22:17:08 +0000 (22:17 +0000)
committerRichard Purdie <richard@openedhand.com>
Wed, 26 Jul 2006 22:17:08 +0000 (22:17 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@561 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/classes/base.bbclass

index 6f23a846fa46db50e15e0869cc1ab4d5e4ba2f6f..cd70748b7c1c8fe5ab67e832563da8132da6d68f 100644 (file)
@@ -46,6 +46,13 @@ def base_contains(variable, checkvalue, truevalue, falsevalue, d):
        else:
                return falsevalue
 
+def base_both_contain(variable1, variable2, checkvalue, d):
+       import bb
+       if bb.data.getVar(variable1,d,1).find(checkvalue) != -1 and bb.data.getVar(variable2,d,1).find(checkvalue) != -1:
+               return checkvalue
+       else:
+               return ""
+
 DEPENDS_prepend="${@base_dep_prepend(d)} "
 
 def base_set_filespath(path, d):