[gnome-continuous-yocto/gnomeostree-3.28-rocko: 925/8267] update-rc.d.bbclass: Disable class when sysvinit is not in DISTRO_FEATURES



commit 1ed0e8a0e6aa4f67deee56a13a4ee2726bde2e27
Author: Mariano Lopez <mariano lopez linux intel com>
Date:   Fri Jun 10 11:48:53 2016 +0000

    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>

 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 2a0a74a..82b8024 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]