diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/libc-package.bbclass | 6 | ||||
-rw-r--r-- | meta/classes/systemd.bbclass | 15 | ||||
-rw-r--r-- | meta/classes/update-rc.d.bbclass | 2 |
3 files changed, 11 insertions, 12 deletions
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass index 454ee76602..0af42a002c 100644 --- a/meta/classes/libc-package.bbclass +++ b/meta/classes/libc-package.bbclass | |||
@@ -36,10 +36,10 @@ python __anonymous () { | |||
36 | d.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile") | 36 | d.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile") |
37 | break | 37 | break |
38 | 38 | ||
39 | distro_features = (d.getVar('DISTRO_FEATURES', True) or '').split() | ||
40 | |||
41 | # try to fix disable charsets/locales/locale-code compile fail | 39 | # try to fix disable charsets/locales/locale-code compile fail |
42 | if 'libc-charsets' in distro_features and 'libc-locales' in distro_features and 'libc-locale-code' in distro_features: | 40 | if oe.utils.contains('DISTRO_FEATURES', 'libc-charsets', True, False, d) and \ |
41 | oe.utils.contains('DISTRO_FEATURES', 'libc-locales', True, False, d) and \ | ||
42 | oe.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 7a8d35cd2f..efc1adcacb 100644 --- a/meta/classes/systemd.bbclass +++ b/meta/classes/systemd.bbclass | |||
@@ -12,13 +12,12 @@ SYSTEMD_AUTO_ENABLE ??= "enable" | |||
12 | # even if systemd is not in DISTRO_FEATURES. As such don't make any changes | 12 | # even if systemd is not in DISTRO_FEATURES. As such don't make any changes |
13 | # directly but check the DISTRO_FEATURES first. | 13 | # directly but check the DISTRO_FEATURES first. |
14 | python __anonymous() { | 14 | python __anonymous() { |
15 | features = d.getVar("DISTRO_FEATURES", True).split() | ||
16 | # 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 |
17 | # 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 |
18 | # files. | 17 | # files. |
19 | if "systemd" in features: | 18 | if oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d): |
20 | d.appendVar("DEPENDS", " systemd-systemctl-native") | 19 | d.appendVar("DEPENDS", " systemd-systemctl-native") |
21 | if "sysvinit" not in features: | 20 | if not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): |
22 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | 21 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") |
23 | } | 22 | } |
24 | 23 | ||
@@ -52,7 +51,7 @@ fi | |||
52 | systemd_populate_packages[vardeps] += "systemd_prerm systemd_postinst" | 51 | systemd_populate_packages[vardeps] += "systemd_prerm systemd_postinst" |
53 | 52 | ||
54 | python systemd_populate_packages() { | 53 | python systemd_populate_packages() { |
55 | if "systemd" not in d.getVar("DISTRO_FEATURES", True).split(): | 54 | if not oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d): |
56 | return | 55 | return |
57 | 56 | ||
58 | def get_package_var(d, var, pkg): | 57 | def get_package_var(d, var, pkg): |
@@ -167,7 +166,7 @@ PACKAGESPLITFUNCS_prepend = "systemd_populate_packages " | |||
167 | 166 | ||
168 | python rm_systemd_unitdir (){ | 167 | python rm_systemd_unitdir (){ |
169 | import shutil | 168 | import shutil |
170 | if "systemd" not in d.getVar("DISTRO_FEATURES", True).split(): | 169 | if not oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d): |
171 | systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True)) | 170 | systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True)) |
172 | if os.path.exists(systemd_unitdir): | 171 | if os.path.exists(systemd_unitdir): |
173 | shutil.rmtree(systemd_unitdir) | 172 | shutil.rmtree(systemd_unitdir) |
@@ -181,9 +180,9 @@ python rm_sysvinit_initddir (){ | |||
181 | import shutil | 180 | import shutil |
182 | sysv_initddir = oe.path.join(d.getVar("D", True), (d.getVar('INIT_D_DIR', True) or "/etc/init.d")) | 181 | sysv_initddir = oe.path.join(d.getVar("D", True), (d.getVar('INIT_D_DIR', True) or "/etc/init.d")) |
183 | 182 | ||
184 | if ("systemd" in d.getVar("DISTRO_FEATURES", True).split() and | 183 | if oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) and \ |
185 | "sysvinit" not in d.getVar("DISTRO_FEATURES", True).split() and | 184 | not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \ |
186 | os.path.exists(sysv_initddir)): | 185 | os.path.exists(sysv_initddir): |
187 | systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True), "system") | 186 | systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True), "system") |
188 | 187 | ||
189 | # If systemd_unitdir contains anything, delete sysv_initddir | 188 | # If systemd_unitdir contains anything, delete sysv_initddir |
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass index 29b5a8ea27..c9bf04c4f8 100644 --- a/meta/classes/update-rc.d.bbclass +++ b/meta/classes/update-rc.d.bbclass | |||
@@ -105,7 +105,7 @@ python populate_packages_updatercd () { | |||
105 | 105 | ||
106 | # Check that this class isn't being inhibited (generally, by | 106 | # Check that this class isn't being inhibited (generally, by |
107 | # systemd.bbclass) before doing any work. | 107 | # systemd.bbclass) before doing any work. |
108 | if "sysvinit" in d.getVar("DISTRO_FEATURES").split() or \ | 108 | if oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) or \ |
109 | not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True): | 109 | not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True): |
110 | pkgs = d.getVar('INITSCRIPT_PACKAGES', True) | 110 | pkgs = d.getVar('INITSCRIPT_PACKAGES', True) |
111 | if pkgs == None: | 111 | if pkgs == None: |