summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-12-20 00:00:03 +0000
committerRichard Purdie <richard@openedhand.com>2006-12-20 00:00:03 +0000
commitf5b38f9db0cebb0c7c9d9d72fa98a4ff5241db20 (patch)
tree337089b8ad5015b9485099a263763c0c72cd3a99 /meta/classes
parent50bbb7742c760360d1003e441e2a029bee3035df (diff)
downloadpoky-f5b38f9db0cebb0c7c9d9d72fa98a4ff5241db20.tar.gz
Remove DISTRO_TYPE, replacing with IMAGE_FEATURES. Documentation is in local.conf.sample
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1053 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/base.bbclass17
1 files changed, 11 insertions, 6 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e7725b7443..e08a2be2d2 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -41,12 +41,17 @@ def base_conditional(variable, checkvalue, truevalue, falsevalue, d):
41 else: 41 else:
42 return falsevalue 42 return falsevalue
43 43
44def base_contains(variable, checkvalue, truevalue, falsevalue, d): 44def base_contains(variable, checkvalues, truevalue, falsevalue, d):
45 import bb 45 import bb
46 if bb.data.getVar(variable,d,1).find(checkvalue) != -1: 46 matches = 0
47 return truevalue 47 if type(checkvalues).__name__ == "str":
48 else: 48 checkvalues = [checkvalues]
49 return falsevalue 49 for value in checkvalues:
50 if bb.data.getVar(variable,d,1).find(value) != -1:
51 matches = matches + 1
52 if matches == len(checkvalues):
53 return truevalue
54 return falsevalue
50 55
51def base_both_contain(variable1, variable2, checkvalue, d): 56def base_both_contain(variable1, variable2, checkvalue, d):
52 import bb 57 import bb