summaryrefslogtreecommitdiff
path: root/meta/classes/systemd.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/systemd.bbclass')
-rw-r--r--meta/classes/systemd.bbclass9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index 0447e53db9..9763faae63 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 "