systemd.bbclass: set INHIBIT_UPDATERCD_BBCLASS like oe-core does now
authorMartin Jansa <Martin.Jansa@gmail.com>
Thu, 28 Mar 2013 13:45:03 +0000 (14:45 +0100)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 16:28:42 +0000 (08:28 -0800)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
meta-openembedded/meta-systemd/classes/systemd.bbclass

index f2a0363..4069367 100644 (file)
@@ -33,6 +33,14 @@ def get_package_var(d, var, pkg):
     return val
 
 def systemd_after_parse(d):
+    features = d.getVar("DISTRO_FEATURES", True).split()
+    # If the distro features have systemd but not sysvinit, inhibit update-rcd
+    # from doing any work so that pure-systemd images don't have redundant init
+    # files.
+    if "systemd" in features:
+        if "sysvinit" not in features:
+            d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+
     def systemd_check_vars():
         if d.getVar('BB_WORKERCONTEXT', True) is not None:
             return