]> code.ossystems Code Review - openembedded-core.git/commitdiff
dnf: remove systemd units in nativesdk builds
authorRoss Burton <ross.burton@intel.com>
Tue, 28 Mar 2017 09:31:50 +0000 (10:31 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Mar 2017 09:34:26 +0000 (10:34 +0100)
If the DISTRO_FEATURES contain systemd then the systemd class won't delete the
units for us. Until the class is fixed to do this automatically, delete them
explicitly.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/dnf/dnf_git.bb

index 7d7f597e5a3fba0d5b8268fc96ac30e9c65a5fb6..b6b6ceaff13e7336c274ad1af9f63d49d0a6e1f5 100644 (file)
@@ -42,6 +42,12 @@ do_install_append_class-native() {
                 RPM_NO_CHROOT_FOR_SCRIPTS=1
 }
 
+# If the distro uses systemd then these won't be deleted by systemd.bbclass
+do_install_append_class-nativesdk() {
+    rm -rf ${D}/${systemd_unitdir}
+    rmdir --ignore-fail-on-non-empty ${D}${nonarch_base_libdir}
+}
+
 SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
                          dnf-automatic-download.service dnf-automatic-download.timer \
                          dnf-automatic-install.service dnf-automatic-install.timer \