diff options
author | Ross Burton <ross.burton@intel.com> | 2013-02-11 16:01:20 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-11 22:48:50 +0000 |
commit | 2c87657be94b8eb0b4a7abc6afee2e96d847e6e9 (patch) | |
tree | 488303a9a84650886f997294b4f80e55dcad1544 /meta | |
parent | ce3d50899dd5d16fde73135d9b644ba181d48d20 (diff) | |
download | poky-2c87657be94b8eb0b4a7abc6afee2e96d847e6e9.tar.gz |
systemd.bbclass: use PACKAGESPLITFUNCS instead of populate_packages_prepend
This is cleaner and leads to more accurate profiles.
(From OE-Core rev: eed7294ba9aedf47af5c64ff11777015e59f48ef)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 " | ||