diff options
-rw-r--r-- | meta/classes/systemd.bbclass | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass index e0ea65c87e..8b558137ab 100644 --- a/meta/classes/systemd.bbclass +++ b/meta/classes/systemd.bbclass | |||
@@ -10,7 +10,7 @@ SYSTEMD_AUTO_ENABLE ??= "enable" | |||
10 | # even if the systemd DISTRO_FEATURE isn't enabled. As such don't make any | 10 | # even if the systemd DISTRO_FEATURE isn't enabled. As such don't make any |
11 | # changes directly but check the DISTRO_FEATURES first. | 11 | # changes directly but check the DISTRO_FEATURES first. |
12 | python __anonymous() { | 12 | python __anonymous() { |
13 | if oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): | 13 | if "systemd" in d.getVar("DISTRO_FEATURES", True).split(): |
14 | d.appendVar("DEPENDS", " systemd-systemctl-native") | 14 | d.appendVar("DEPENDS", " systemd-systemctl-native") |
15 | # Set a variable so that update-rcd.bbclass knows we're active and can | 15 | # Set a variable so that update-rcd.bbclass knows we're active and can |
16 | # disable itself. | 16 | # disable itself. |
@@ -39,7 +39,10 @@ fi | |||
39 | systemctl disable ${SYSTEMD_SERVICE} | 39 | systemctl disable ${SYSTEMD_SERVICE} |
40 | } | 40 | } |
41 | 41 | ||
42 | def systemd_populate_packages(d): | 42 | python systemd_populate_packages() { |
43 | if "systemd" not in d.getVar("DISTRO_FEATURES", True).split(): | ||
44 | return | ||
45 | |||
43 | def get_package_var(d, var, pkg): | 46 | def get_package_var(d, var, pkg): |
44 | val = (d.getVar('%s_%s' % (var, pkg), True) or "").strip() | 47 | val = (d.getVar('%s_%s' % (var, pkg), True) or "").strip() |
45 | if val == "": | 48 | if val == "": |
@@ -150,9 +153,6 @@ def systemd_populate_packages(d): | |||
150 | systemd_generate_package_scripts(pkg) | 153 | systemd_generate_package_scripts(pkg) |
151 | systemd_add_rdepends(pkg) | 154 | systemd_add_rdepends(pkg) |
152 | systemd_check_services() | 155 | systemd_check_services() |
153 | |||
154 | |||
155 | python populate_packages_prepend () { | ||
156 | if oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): | ||
157 | systemd_populate_packages (d) | ||
158 | } | 156 | } |
157 | |||
158 | PACKAGESPLITFUNCS_prepend = "systemd_populate_packages " | ||