Re: [OE-core] [PATCH 2/2] update-rc.d: Remove init.d dir if sysvinit is not in distro features

2013-07-19 Thread Paul Eggleton
On Friday 19 July 2013 08:02:32 Chris Larson wrote:
> On Fri, Jul 19, 2013 at 4:53 AM, Shakeel, Muhammad 
>  wrote:
> > From: Muhammad Shakeel 
> > 
> > If sysvinit is not supported DISTRO_FEATURE than there is no need to
> > package related initialization scripts.
> > 
> > Signed-off-by: Muhammad Shakeel 
> 
> If we stop shipping init.d for non-sysvinit distros, which makes sense, we
> should also consider automatically enabling/disabling sysv compat support
> in the systems build based on that distro feature also. So, I support this
> commit, but am proposing adding another for consistency :)

Yes, actually at the moment I think we cannot delete the sysvinit initscripts 
unless the recipe also inherits systemd, otherwise there will be no fallback 
to sysvinit compatibility and the daemon will no longer be started.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/2] update-rc.d: Remove init.d dir if sysvinit is not in distro features

2013-07-19 Thread Chris Larson
On Fri, Jul 19, 2013 at 4:53 AM, Shakeel, Muhammad <
muhammad_shak...@mentor.com> wrote:

> From: Muhammad Shakeel 
>
> If sysvinit is not supported DISTRO_FEATURE than there is no need to
> package related initialization scripts.
>
> Signed-off-by: Muhammad Shakeel 
>

If we stop shipping init.d for non-sysvinit distros, which makes sense, we
should also consider automatically enabling/disabling sysv compat support
in the systems build based on that distro feature also. So, I support this
commit, but am proposing adding another for consistency :)
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2] update-rc.d: Remove init.d dir if sysvinit is not in distro features

2013-07-19 Thread Shakeel, Muhammad
From: Muhammad Shakeel 

If sysvinit is not supported DISTRO_FEATURE than there is no need to
package related initialization scripts.

Signed-off-by: Muhammad Shakeel 
---
 meta/classes/update-rc.d.bbclass |9 +
 1 file changed, 9 insertions(+)

diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 5588569..946c077 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -99,3 +99,12 @@ python populate_packages_updatercd () {
 for pkg in pkgs.split():
 update_rcd_package(pkg)
 }
+
+python rm_sysvinit_initddir (){
+import shutil
+if "sysvinit" not in d.getVar("DISTRO_FEATURES", True).split():
+sysv_initddir = oe.path.join(d.getVar("D", True), 
d.getVar('INIT_D_DIR', True))
+if os.path.exists(sysv_initddir):
+shutil.rmtree(sysv_initddir)
+}
+do_install[postfuncs] += "rm_sysvinit_initddir "
-- 
1.7.9.5

___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core