diff options
-rw-r--r-- | 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 0447e53db9..9763faae63 100644 --- a/meta/classes/systemd.bbclass +++ b/meta/classes/systemd.bbclass | |||
@@ -161,3 +161,12 @@ python systemd_populate_packages() { | |||
161 | } | 161 | } |
162 | 162 | ||
163 | PACKAGESPLITFUNCS_prepend = "systemd_populate_packages " | 163 | PACKAGESPLITFUNCS_prepend = "systemd_populate_packages " |
164 | |||
165 | python rm_systemd_unitdir (){ | ||
166 | import shutil | ||
167 | if "systemd" not in d.getVar("DISTRO_FEATURES", True).split(): | ||
168 | systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True)) | ||
169 | if os.path.exists(systemd_unitdir): | ||
170 | shutil.rmtree(systemd_unitdir) | ||
171 | } | ||
172 | do_install[postfuncs] += "rm_systemd_unitdir " | ||