diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2016-06-10 11:48:53 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-15 18:05:21 +0100 |
commit | 1ed0e8a0e6aa4f67deee56a13a4ee2726bde2e27 (patch) | |
tree | 8e5ff259ac97783801c9443e41c370463f6ae8b3 /meta/classes/update-rc.d.bbclass | |
parent | 44ab979c4d7d5bc09df6fe920d5a171d281fa600 (diff) | |
download | poky-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.bbclass | 8 |
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 @@ | |||
1 | UPDATERCPN ?= "${PN}" | 1 | UPDATERCPN ?= "${PN}" |
2 | 2 | ||
3 | DEPENDS_append_class-target = " update-rc.d-native update-rc.d initscripts" | 3 | DEPENDS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', ' update-rc.d-native update-rc.d initscripts', '', d)}" |
4 | |||
4 | UPDATERCD = "update-rc.d" | 5 | UPDATERCD = "update-rc.d" |
5 | UPDATERCD_class-cross = "" | 6 | UPDATERCD_class-cross = "" |
6 | UPDATERCD_class-native = "" | 7 | UPDATERCD_class-native = "" |
@@ -64,7 +65,7 @@ python __anonymous() { | |||
64 | update_rc_after_parse(d) | 65 | update_rc_after_parse(d) |
65 | } | 66 | } |
66 | 67 | ||
67 | PACKAGESPLITFUNCS_prepend = "populate_packages_updatercd " | 68 | PACKAGESPLITFUNCS_prepend = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'populate_packages_updatercd ', '', d)}" |
68 | PACKAGESPLITFUNCS_remove_class-nativesdk = "populate_packages_updatercd " | 69 | PACKAGESPLITFUNCS_remove_class-nativesdk = "populate_packages_updatercd " |
69 | 70 | ||
70 | populate_packages_updatercd[vardeps] += "updatercd_prerm updatercd_postrm updatercd_preinst updatercd_postinst" | 71 | populate_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) |