summaryrefslogtreecommitdiff
path: root/classes/base.bbclass
diff options
context:
space:
mode:
authorPaul Sokolovsky <pmiscml@gmail.com>2007-02-27 20:15:52 +0000
committerPaul Sokolovsky <pmiscml@gmail.com>2007-02-27 20:15:52 +0000
commit2b4cbb2de4039b43102e50927a60362f1baae324 (patch)
tree9a906a5c31c1afb7364a0cb79b0a823589041f68 /classes/base.bbclass
parenta3fea19a494a25c3c4adbda0e3753a34c3c35757 (diff)
base.bbclass: Add base_less_or_equal(): perform comparison fo integer/floating point values for <=.
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 a08ba97fde..53139e19fa 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -51,6 +51,13 @@ def base_conditional(variable, checkvalue, truevalue, falsevalue, d):
else:
return falsevalue
+def base_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
+ import bb
+ if float(bb.data.getVar(variable,d,1)) <= float(checkvalue):
+ return truevalue
+ else:
+ return falsevalue
+
def base_contains(variable, checkvalues, truevalue, falsevalue, d):
import bb
matches = 0