]> code.ossystems Code Review - openembedded-core.git/commitdiff
systemd: Remove systemd_unitdir if systemd is not in distro features
authorMuhammad Shakeel <muhammad_shakeel@mentor.com>
Fri, 19 Jul 2013 11:53:25 +0000 (16:53 +0500)
committerSaul Wold <sgw@linux.intel.com>
Tue, 23 Jul 2013 14:49:54 +0000 (07:49 -0700)
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>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/systemd.bbclass

index 0447e53db97e21660dca49edc8b0efb9a671e9a3..9763faae63887ae972f396be9fb61a643cd0f340 100644 (file)
@@ -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 "