]> code.ossystems Code Review - openembedded-core.git/commitdiff
systemd: Remove X11 related files when disabled
authorAlex Kiernan <alex.kiernan@gmail.com>
Fri, 27 Mar 2020 17:25:14 +0000 (17:25 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 30 Mar 2020 11:33:10 +0000 (12:33 +0100)
When X11 isn't in DISTRO_FEATURES, remove X11 related files.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/systemd/systemd_244.3.bb

index 287f07b29f029cdd8a4e9ee0a92898315bf43f5b..2b3dad602f57a6c9d999365cdc09738a2a319d2e 100644 (file)
@@ -275,6 +275,10 @@ do_install() {
                sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
                ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
        fi
+       if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then
+               rm ${D}${exec_prefix}/lib/tmpfiles.d/x11.conf
+               rm -r ${D}${sysconfdir}/X11
+       fi
 
        # If polkit is setup fixup permissions and ownership
        if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then