summaryrefslogtreecommitdiff
path: root/classes/base.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r--classes/base.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index e6f8e43fd6..f6dcba2b96 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -32,6 +32,13 @@ def base_read_file(filename):
return f.read().strip()
return None
+def base_conditional(variable, checkvalue, truevalue, falsevalue, d):
+ import bb
+ if bb.data.getVar(variable,d,1) == checkvalue:
+ return truevalue
+ else:
+ return falsevalue
+
DEPENDS_prepend="${@base_dep_prepend(d)} "
def base_set_filespath(path, d):