summaryrefslogtreecommitdiff
path: root/classes/base.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2006-08-27 16:02:10 +0000
committerRichard Purdie <rpurdie@rpsys.net>2006-08-27 16:02:10 +0000
commite609b8070d657674563ae304991f8b3307dc1b73 (patch)
tree5f8c7d2dec0df160ab66b6ddaae6883b53b85bf0 /classes/base.bbclass
parentc3352186941a100ee3812472531ca3359fef4b95 (diff)
base.bbclass: Add base_contains and base_both_containg - useful functions for the new task-machine code (from poky)
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r--classes/base.bbclass14
1 files changed, 14 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index e413afb2b3..670b97a72d 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -40,6 +40,20 @@ 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
+
+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):