Patchwork systemd.bbclass: set INHIBIT_UPDATERCD_BBCLASS like oe-core does now

login
register
mail settings
Submitter Martin Jansa
Date March 29, 2013, 12:07 p.m.
Message ID <1364558878-1506-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/47119/
State Accepted, archived
Commit 3dcb4f293beddcdc36fa44d35d3e1dfcd1deb3d2
Headers show

Comments

Martin Jansa - March 29, 2013, 12:07 p.m.
---
 meta-systemd/classes/systemd.bbclass | 8 ++++++++
 1 file changed, 8 insertions(+)

Patch

diff --git a/meta-systemd/classes/systemd.bbclass b/meta-systemd/classes/systemd.bbclass
index f2a0363..4069367 100644
--- a/meta-systemd/classes/systemd.bbclass
+++ b/meta-systemd/classes/systemd.bbclass
@@ -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