[yocto] [yocto-autobuilder][RFC 2/6] CreateAutoConf.py: add initmgr option

Stefan Stanacar stefanx.stanacar at intel.com
Tue Apr 23 11:52:02 PDT 2013


Add an option to set the init manager used. This is used
for building images with systemd.
The order is important as it decides the primary one.

Signed-off-by: Stefan Stanacar <stefanx.stanacar at intel.com>
---
 .../site-packages/autobuilder/buildsteps/CreateAutoConf.py  | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/CreateAutoConf.py b/lib/python2.7/site-packages/autobuilder/buildsteps/CreateAutoConf.py
index 3a4b9f9..4af9860 100644
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/CreateAutoConf.py
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/CreateAutoConf.py
@@ -36,6 +36,7 @@ class CreateAutoConf(ShellCommand):
         self.adtdev=False
         self.factory = factory
         self.buildappsrcrev = "${AUTOREV}"
+        self.initmgr=None
         self.kwargs = kwargs
         for k, v in argdict.iteritems():
             if type(v) is bool:
@@ -119,6 +120,18 @@ class CreateAutoConf(ShellCommand):
                 else:
                     adtrepo_url=os.environ.get("ADTREPO_URL")
                     fout=fout+'ADTREPO = "' + adtrepo_url + '/' + self.getProperty("distroversion") + '"\n'
+            if self.getProperty("branch_poky") != "danny" and self.initmgr:
+                # we don't neet to test sysvinit only, because that's the default
+                if self.initmgr == "systemd":
+                    fout = fout + 'DISTRO_FEATURES_append = " systemd"\n'
+                    fout = fout + 'VIRTUAL-RUNTIME_init_manager = "systemd"\n'
+                    fout = fout + 'DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"\n'
+                if self.initmgr == "systemd sysvinit":
+                    fout = fout + 'DISTRO_FEATURES_append = " systemd"\n'
+                    fout = fout + 'VIRTUAL-RUNTIME_init_manager = "systemd"\n'
+                if self.initmgr == "sysvinit systemd":
+                    fout = fout + 'DISTRO_FEATURES_append = " systemd"\n'
+                    fout = fout + 'VIRTUAL-RUNTIME_init_manager = "sysvinit"\n'
         if self.atextappend:
             fout = fout + self.atextappend
 
-- 
1.8.1.4




More information about the yocto mailing list