Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] systemd: Remove systemd_unitdir if systemd is not in distro features
@ 2013-07-19 11:53 Shakeel, Muhammad
  2013-07-19 11:53 ` [PATCH 2/2] update-rc.d: Remove init.d dir if sysvinit " Shakeel, Muhammad
  2013-07-23 13:59 ` [PATCH 1/2] systemd: Remove systemd_unitdir if systemd " Burton, Ross
  0 siblings, 2 replies; 6+ messages in thread
From: Shakeel, Muhammad @ 2013-07-19 11:53 UTC (permalink / raw)
  To: openembedded-core

From: Muhammad Shakeel <muhammad_shakeel@mentor.com>

If systemd is not supported DISTRO_FEATURE than there is no need to
package related service files.

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
---
 meta/classes/systemd.bbclass |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index 0447e53..9763faa 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -161,3 +161,12 @@ python systemd_populate_packages() {
 }
 
 PACKAGESPLITFUNCS_prepend = "systemd_populate_packages "
+
+python rm_systemd_unitdir (){
+    import shutil
+    if "systemd" not in d.getVar("DISTRO_FEATURES", True).split():
+        systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True))
+        if os.path.exists(systemd_unitdir):
+            shutil.rmtree(systemd_unitdir)
+}
+do_install[postfuncs] += "rm_systemd_unitdir "
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-24  6:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-19 11:53 [PATCH 1/2] systemd: Remove systemd_unitdir if systemd is not in distro features Shakeel, Muhammad
2013-07-19 11:53 ` [PATCH 2/2] update-rc.d: Remove init.d dir if sysvinit " Shakeel, Muhammad
2013-07-19 15:02   ` Chris Larson
2013-07-19 15:13     ` Paul Eggleton
2013-07-23 13:59 ` [PATCH 1/2] systemd: Remove systemd_unitdir if systemd " Burton, Ross
2013-07-24  6:57   ` Muhammad Shakeel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox