| Submitter | Andreas Müller |
|---|---|
| Date | Feb. 7, 2012, 3:12 p.m. |
| Message ID | <1328627573-5217-3-git-send-email-schnitzeltony@googlemail.com> |
| Download | mbox | patch |
| Permalink | /patch/20821/ |
| State | Rejected |
| Headers | show |
Comments
On Tuesday 07 February 2012 16:12:28 Andreas Müller wrote: > initmanager_packets(d): returns the required initmanager-packets. The result > is based upon INIT_MANAGER. Currently the values 'systemd' and 'sysvinit' > are supported for INIT_MANAGER. > > Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> > --- > meta-oe/classes/initmanager.bbclass | 10 ++++++++++ > 1 files changed, 10 insertions(+), 0 deletions(-) > create mode 100644 meta-oe/classes/initmanager.bbclass > > diff --git a/meta-oe/classes/initmanager.bbclass > b/meta-oe/classes/initmanager.bbclass new file mode 100644 > index 0000000..2f8e2ce > --- /dev/null > +++ b/meta-oe/classes/initmanager.bbclass > @@ -0,0 +1,10 @@ > +# returns the packets initmanager requires in image > +def initmanager_packets(d): > + init_manager = d.getVar('INIT_MANAGER', 0) or "" > + # default: just a suggestion - to be discussed? > + pks_initmanager = 'systemd' > + if init_manager == 'systemd': > + pks_initmanager = 'systemd' > + elif init_manager == 'sysvinit': > + pks_initmanager = 'sysvinit sysvinit-pidof' > + return pks_initmanager Would it be possible to turn this on its head and merge systemd.bbclass/update-rc.d.bbclass into one so that it does the appropriate thing for whatever INIT_MANAGER is set to for every recipe that uses it? Cheers, Paul
On Tue, Feb 7, 2012 at 13:39, Paul Eggleton <paul.eggleton@linux.intel.com>wrote: > Would it be possible to turn this on its head and merge > systemd.bbclass/update-rc.d.bbclass into one so that it does the > appropriate > thing for whatever INIT_MANAGER is set to for every recipe that uses it? > I'd say initmanager.bbclass ought to inherit both and handle the packaging for both. As Koen said, I'd prefer to have it as an image decision not an distro decision. We might not build one, if distro drops the feature but by default both ought to be build IMO.
On (07/02/12 13:57), Otavio Salvador wrote: > On Tue, Feb 7, 2012 at 13:39, Paul Eggleton > <paul.eggleton@linux.intel.com>wrote: > > > Would it be possible to turn this on its head and merge > > systemd.bbclass/update-rc.d.bbclass into one so that it does the > > appropriate > > thing for whatever INIT_MANAGER is set to for every recipe that uses it? > > > > I'd say initmanager.bbclass ought to inherit both and handle the packaging > for both. As Koen said, I'd prefer to have it as an image decision not an > distro decision. We might not build one, if distro drops the feature but by > default both ought to be build IMO. some of packages depend on availability of one or another e.g. systemd if present some recipes compile one way otherwise not so a distro using same tmpdir to spit out two images with two different init managers can be a challage
Patch
diff --git a/meta-oe/classes/initmanager.bbclass b/meta-oe/classes/initmanager.bbclass new file mode 100644 index 0000000..2f8e2ce --- /dev/null +++ b/meta-oe/classes/initmanager.bbclass @@ -0,0 +1,10 @@ +# returns the packets initmanager requires in image +def initmanager_packets(d): + init_manager = d.getVar('INIT_MANAGER', 0) or "" + # default: just a suggestion - to be discussed? + pks_initmanager = 'systemd' + if init_manager == 'systemd': + pks_initmanager = 'systemd' + elif init_manager == 'sysvinit': + pks_initmanager = 'sysvinit sysvinit-pidof' + return pks_initmanager
initmanager_packets(d): returns the required initmanager-packets. The result is based upon INIT_MANAGER. Currently the values 'systemd' and 'sysvinit' are supported for INIT_MANAGER. Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> --- meta-oe/classes/initmanager.bbclass | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) create mode 100644 meta-oe/classes/initmanager.bbclass