summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2014-04-24 15:59:19 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-25 17:19:19 +0100
commit08a38a7865c41ec60f4b993b964f8d477ea0f680 (patch)
treebfbf9bface6e748f3ab50d4a86046fc850b0c153 /meta/classes
parentf11e9e295d7f8a1e0219fb7a45a5a134a773aae2 (diff)
downloadpoky-08a38a7865c41ec60f4b993b964f8d477ea0f680.tar.gz
Globally replace oe.utils.contains to bb.utils.contains
BitBake has the exact same code as oe.utils.contains so there's no reason to duplicate it. We now rely on the bb.utils.contains code for metadata. (From OE-Core rev: 93499ebc46547f5bf6dcecd5a786ead9f726de28) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/libc-package.bbclass6
-rw-r--r--meta/classes/systemd.bbclass12
-rw-r--r--meta/classes/update-rc.d.bbclass2
-rw-r--r--meta/classes/utils.bbclass2
4 files changed, 11 insertions, 11 deletions
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index 0af42a002c..c1bc399c18 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -37,9 +37,9 @@ python __anonymous () {
37 break 37 break
38 38
39 # try to fix disable charsets/locales/locale-code compile fail 39 # try to fix disable charsets/locales/locale-code compile fail
40 if oe.utils.contains('DISTRO_FEATURES', 'libc-charsets', True, False, d) and \ 40 if bb.utils.contains('DISTRO_FEATURES', 'libc-charsets', True, False, d) and \
41 oe.utils.contains('DISTRO_FEATURES', 'libc-locales', True, False, d) and \ 41 bb.utils.contains('DISTRO_FEATURES', 'libc-locales', True, False, d) and \
42 oe.utils.contains('DISTRO_FEATURES', 'libc-locale-code', True, False, d): 42 bb.utils.contains('DISTRO_FEATURES', 'libc-locale-code', True, False, d):
43 d.setVar('PACKAGE_NO_GCONV', '0') 43 d.setVar('PACKAGE_NO_GCONV', '0')
44 else: 44 else:
45 d.setVar('PACKAGE_NO_GCONV', '1') 45 d.setVar('PACKAGE_NO_GCONV', '1')
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index 2bd63a405b..a6ad723dfd 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -15,9 +15,9 @@ python __anonymous() {
15 # If the distro features have systemd but not sysvinit, inhibit update-rcd 15 # If the distro features have systemd but not sysvinit, inhibit update-rcd
16 # from doing any work so that pure-systemd images don't have redundant init 16 # from doing any work so that pure-systemd images don't have redundant init
17 # files. 17 # files.
18 if oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d): 18 if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
19 d.appendVar("DEPENDS", " systemd-systemctl-native") 19 d.appendVar("DEPENDS", " systemd-systemctl-native")
20 if not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): 20 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
21 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") 21 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
22} 22}
23 23
@@ -57,7 +57,7 @@ fi
57systemd_populate_packages[vardeps] += "systemd_prerm systemd_postinst" 57systemd_populate_packages[vardeps] += "systemd_prerm systemd_postinst"
58 58
59python systemd_populate_packages() { 59python systemd_populate_packages() {
60 if not oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d): 60 if not bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
61 return 61 return
62 62
63 def get_package_var(d, var, pkg): 63 def get_package_var(d, var, pkg):
@@ -172,7 +172,7 @@ PACKAGESPLITFUNCS_prepend = "systemd_populate_packages "
172 172
173python rm_systemd_unitdir (){ 173python rm_systemd_unitdir (){
174 import shutil 174 import shutil
175 if not oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d): 175 if not bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
176 systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True)) 176 systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True))
177 if os.path.exists(systemd_unitdir): 177 if os.path.exists(systemd_unitdir):
178 shutil.rmtree(systemd_unitdir) 178 shutil.rmtree(systemd_unitdir)
@@ -186,8 +186,8 @@ python rm_sysvinit_initddir (){
186 import shutil 186 import shutil
187 sysv_initddir = oe.path.join(d.getVar("D", True), (d.getVar('INIT_D_DIR', True) or "/etc/init.d")) 187 sysv_initddir = oe.path.join(d.getVar("D", True), (d.getVar('INIT_D_DIR', True) or "/etc/init.d"))
188 188
189 if oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) and \ 189 if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) and \
190 not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \ 190 not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \
191 os.path.exists(sysv_initddir): 191 os.path.exists(sysv_initddir):
192 systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True), "system") 192 systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True), "system")
193 193
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 0ac2af7d97..81cc97621a 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -117,7 +117,7 @@ python populate_packages_updatercd () {
117 117
118 # Check that this class isn't being inhibited (generally, by 118 # Check that this class isn't being inhibited (generally, by
119 # systemd.bbclass) before doing any work. 119 # systemd.bbclass) before doing any work.
120 if oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \ 120 if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \
121 not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True): 121 not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
122 pkgs = d.getVar('INITSCRIPT_PACKAGES', True) 122 pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
123 if pkgs == None: 123 if pkgs == None:
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 89ad8c5531..0ee13e04d7 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -24,7 +24,7 @@ def base_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
24 return oe.utils.version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d) 24 return oe.utils.version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
25 25
26def base_contains(variable, checkvalues, truevalue, falsevalue, d): 26def base_contains(variable, checkvalues, truevalue, falsevalue, d):
27 return oe.utils.contains(variable, checkvalues, truevalue, falsevalue, d) 27 return bb.utils.contains(variable, checkvalues, truevalue, falsevalue, d)
28 28
29def base_both_contain(variable1, variable2, checkvalue, d): 29def base_both_contain(variable1, variable2, checkvalue, d):
30 return oe.utils.both_contain(variable1, variable2, checkvalue, d) 30 return oe.utils.both_contain(variable1, variable2, checkvalue, d)