Skip to contentSkip to conversation

update-rc.d.bbclass: Disable class when sysvinit is not in DISTRO_FEATURES

PATCH In review [email protected] 1 participant 2 messages Jun 10, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 update-rc.d.bbclass: Disable class when sysvinit is not in DISTRO_FEATURES

From: Mariano Lopez <[email protected]>

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]

---
 meta/classes/update-rc.d.bbclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
meta/classes/update-rc.d.bbclass +4 -4
index 2a0a74a..82b8024 100644
@@ -1,6 +1,7 @@
 UPDATERCPN ?= "${PN}"
 
-DEPENDS_append_class-target = " update-rc.d-native update-rc.d initscripts"
+DEPENDS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', ' update-rc.d-native update-rc.d initscripts', '', d)}"
+
 UPDATERCD = "update-rc.d"
 UPDATERCD_class-cross = ""
 UPDATERCD_class-native = ""
@@ -64,7 +65,7 @@ python __anonymous() {
     update_rc_after_parse(d)
 }
 
-PACKAGESPLITFUNCS_prepend = "populate_packages_updatercd "
+PACKAGESPLITFUNCS_prepend = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'populate_packages_updatercd ', '', d)}"
 PACKAGESPLITFUNCS_remove_class-nativesdk = "populate_packages_updatercd "
 
 populate_packages_updatercd[vardeps] += "updatercd_prerm updatercd_postrm updatercd_preinst updatercd_postinst"
@@ -120,8 +121,7 @@ python populate_packages_updatercd () {
 
     # Check that this class isn't being inhibited (generally, by
     # systemd.bbclass) before doing any work.
-    if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) or \
-       not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
+    if not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
         pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
         if pkgs == None:
             pkgs = d.getVar('UPDATERCPN', True)
Signature · 1 line
2.6.6
#2 lore raw
Quoted 8 lines · On 06/10/2016 06:45 AM, [email protected] wrote:

From: Mariano Lopez <[email protected]>

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]

Please disregard this patch, it was meant for OE-core. Sorry for the spam

Mariano