diff options
author | Ross Burton <ross.burton@intel.com> | 2013-03-06 15:11:54 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-26 22:43:03 +0000 |
commit | d82e303921f24b811b2fea9a5eb846736d997975 (patch) | |
tree | ad1f1182817742f796b5e485a66ab4629d6be524 | |
parent | a89520ffe122370d2fae237521d3c4854ee4a5ec (diff) | |
download | poky-d82e303921f24b811b2fea9a5eb846736d997975.tar.gz |
update-rc.d/systemd: change communication variable name
Rename SYSTEMD_BBCLASS_ENABLED to INHIBIT_UPDATERCD_BBCLASS to reflect the
action, for clarity.
(From OE-Core rev: cf43320c343437659aee94acd005bf7712f273cd)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/systemd.bbclass | 11 | ||||
-rw-r--r-- | meta/classes/update-rc.d.bbclass | 8 |
2 files changed, 10 insertions, 9 deletions
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass index cca2152927..42fa554c12 100644 --- a/meta/classes/systemd.bbclass +++ b/meta/classes/systemd.bbclass | |||
@@ -10,11 +10,14 @@ 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 "systemd" in d.getVar("DISTRO_FEATURES", True).split(): | 13 | features = d.getVar("DISTRO_FEATURES", True).split() |
14 | # If the distro features have systemd but not sysvinit, inhibit update-rcd | ||
15 | # from doing any work so that pure-systemd images don't have redundant init | ||
16 | # files. | ||
17 | if "systemd" in features: | ||
14 | d.appendVar("DEPENDS", " systemd-systemctl-native") | 18 | d.appendVar("DEPENDS", " systemd-systemctl-native") |
15 | # Set a variable so that update-rcd.bbclass knows we're active and can | 19 | if "sysvinit" not in features: |
16 | # disable itself. | 20 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") |
17 | d.setVar("SYSTEMD_BBCLASS_ENABLED", "1") | ||
18 | } | 21 | } |
19 | 22 | ||
20 | systemd_postinst() { | 23 | systemd_postinst() { |
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass index 0997702ee9..9f1e28a59d 100644 --- a/meta/classes/update-rc.d.bbclass +++ b/meta/classes/update-rc.d.bbclass | |||
@@ -80,12 +80,10 @@ python populate_packages_updatercd () { | |||
80 | postrm += d.getVar('updatercd_postrm', True) | 80 | postrm += d.getVar('updatercd_postrm', True) |
81 | d.setVar('pkg_postrm_%s' % pkg, postrm) | 81 | d.setVar('pkg_postrm_%s' % pkg, postrm) |
82 | 82 | ||
83 | # Run if the sysvinit feature is present, or if the systemd feature is present | 83 | # Check that this class isn't being inhibited (generally, by |
84 | # but the systemd class hasn't been inherited. We want to run in the latter case | 84 | # systemd.bbclass) before doing any work. |
85 | # as systemd has sysvinit compatibility, but we don't want to always so that | ||
86 | # pure systemd images don't have redundent sysvinit files. | ||
87 | if "sysvinit" in d.getVar("DISTRO_FEATURES").split() or \ | 85 | if "sysvinit" in d.getVar("DISTRO_FEATURES").split() or \ |
88 | ("systemd" in d.getVar("DISTRO_FEATURES").split() and not d.getVar("SYSTEMD_BBCLASS_ENABLED", True)): | 86 | not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True): |
89 | pkgs = d.getVar('INITSCRIPT_PACKAGES', True) | 87 | pkgs = d.getVar('INITSCRIPT_PACKAGES', True) |
90 | if pkgs == None: | 88 | if pkgs == None: |
91 | pkgs = d.getVar('UPDATERCPN', True) | 89 | pkgs = d.getVar('UPDATERCPN', True) |