[oe-commits] Muhammad Shakeel : systemd: Remove systemd_unitdir if systemd is not in distro features

git at git.openembedded.org git at git.openembedded.org
Wed Jul 24 10:26:50 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: ac5d20f4adac69ea1702694fb50849c9e465b443
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=ac5d20f4adac69ea1702694fb50849c9e465b443

Author: Muhammad Shakeel <muhammad_shakeel at mentor.com>
Date:   Fri Jul 19 16:53:25 2013 +0500

systemd: Remove systemd_unitdir if systemd is not in distro features

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

Signed-off-by: Muhammad Shakeel <muhammad_shakeel at mentor.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/classes/systemd.bbclass |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

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 "



More information about the Openembedded-commits mailing list