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

Flanagan, Elizabeth elizabeth.flanagan at intel.com
Wed Apr 24 10:22:13 PDT 2013


On Tue, Apr 23, 2013 at 11:52 AM, Stefan Stanacar
<stefanx.stanacar at intel.com> wrote:
> 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:

Here we will probably want to do:

                if "danny" not in self.getProperty("branch_poky")....

That covers cases where we have "danny-next" or some other issue. I'm
sure I do what you do above, and if so, that should be fixed.

> +                # 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
>



--
Elizabeth Flanagan
Yocto Project
Build and Release



More information about the yocto mailing list