diff options
author | Muhammad Shakeel <muhammad_shakeel@mentor.com> | 2013-07-19 16:53:25 +0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-07-24 11:35:39 +0100 |
commit | 67864ca79da08df752487a3a4e1a975546da123d (patch) | |
tree | c1299346b8b92c4048842001de4f2c4320b7a137 | |
parent | c39bd6971a7ae9f8134891e8cc8ced887f75ac21 (diff) | |
download | poky-67864ca79da08df752487a3a4e1a975546da123d.tar.gz |
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.
(From OE-Core rev: ac5d20f4adac69ea1702694fb50849c9e465b443)
Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 " | ||