Add a QA check for systemd unit file install.
authorMichał Górny <mgorny@gentoo.org>
Fri, 24 Jun 2011 15:51:17 +0000 (17:51 +0200)
committerZac Medico <zmedico@gentoo.org>
Fri, 24 Jun 2011 20:34:19 +0000 (13:34 -0700)
bin/misc-functions.sh

index b28b73fff2fc3802c908f0bbc7334b62dfa22c99..09decf32734967f11ade3404e2132e456e9c3492 100755 (executable)
@@ -714,6 +714,16 @@ install_qa_check() {
                done
                [[ ${abort} == yes ]] && die "multilib-strict check failed!"
        fi
+
+       # ensure packages don't install systemd units automagically
+       if ! hasq systemd ${INHERITED} && \
+               [[ -d "${D}"/lib/systemd/system ]]
+       then
+               eqawarn "QA Notice: package installs systemd unit files (/lib/systemd/system)"
+               eqawarn "           but does not inherit systemd.eclass."
+               hasq stricter ${FEATURES} \
+                       && die "install aborted due to missing inherit of systemd.eclass"
+       fi
 }