summaryrefslogtreecommitdiffstats
path: root/meta/classes/update-rc.d.bbclass
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-06-10 11:48:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-15 18:05:21 +0100
commit1ed0e8a0e6aa4f67deee56a13a4ee2726bde2e27 (patch)
tree8e5ff259ac97783801c9443e41c370463f6ae8b3 /meta/classes/update-rc.d.bbclass
parent44ab979c4d7d5bc09df6fe920d5a171d281fa600 (diff)
downloadpoky-1ed0e8a0e6aa4f67deee56a13a4ee2726bde2e27.tar.gz
update-rc.d.bbclass: Disable class when sysvinit is not in DISTRO_FEATURES
When sysvinit is not in use, update-rd.d class adds build dependencies that won't be needed, this patch removes the build dependecies and won't add the task to PACKAGESPLITFUNCS. [YOCTO #9515] (From OE-Core rev: 5b2139a79cd8c280e755923016b3a6e84413184e) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/update-rc.d.bbclass')
-rw-r--r--meta/classes/update-rc.d.bbclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 2a0a74a5f5..82b80245d4 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -1,6 +1,7 @@
1UPDATERCPN ?= "${PN}" 1UPDATERCPN ?= "${PN}"
2 2
3DEPENDS_append_class-target = " update-rc.d-native update-rc.d initscripts" 3DEPENDS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', ' update-rc.d-native update-rc.d initscripts', '', d)}"
4
4UPDATERCD = "update-rc.d" 5UPDATERCD = "update-rc.d"
5UPDATERCD_class-cross = "" 6UPDATERCD_class-cross = ""
6UPDATERCD_class-native = "" 7UPDATERCD_class-native = ""
@@ -64,7 +65,7 @@ python __anonymous() {
64 update_rc_after_parse(d) 65 update_rc_after_parse(d)
65} 66}
66 67
67PACKAGESPLITFUNCS_prepend = "populate_packages_updatercd " 68PACKAGESPLITFUNCS_prepend = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'populate_packages_updatercd ', '', d)}"
68PACKAGESPLITFUNCS_remove_class-nativesdk = "populate_packages_updatercd " 69PACKAGESPLITFUNCS_remove_class-nativesdk = "populate_packages_updatercd "
69 70
70populate_packages_updatercd[vardeps] += "updatercd_prerm updatercd_postrm updatercd_preinst updatercd_postinst" 71populate_packages_updatercd[vardeps] += "updatercd_prerm updatercd_postrm updatercd_preinst updatercd_postinst"
@@ -120,8 +121,7 @@ python populate_packages_updatercd () {
120 121
121 # Check that this class isn't being inhibited (generally, by 122 # Check that this class isn't being inhibited (generally, by
122 # systemd.bbclass) before doing any work. 123 # systemd.bbclass) before doing any work.
123 if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) or \ 124 if not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
124 not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
125 pkgs = d.getVar('INITSCRIPT_PACKAGES', True) 125 pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
126 if pkgs == None: 126 if pkgs == None:
127 pkgs = d.getVar('UPDATERCPN', True) 127 pkgs = d.getVar('UPDATERCPN', True)