commit:     c6fc517e4bc5649e01af9d10a445338805a0cdfc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 19 01:34:11 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Aug 19 01:34:55 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6fc517e

metadata/install-qa-check.d: skip some checks when TMPFILES_OPTIONAL is set

This is a good enough proxy for "this package has a complicated
relationship with tmpfiles" and replaces the hardcoded list of
exemptions.

Closes: https://bugs.gentoo.org/808781
Signed-off-by: Sam James <sam <AT> gentoo.org>

 metadata/install-qa-check.d/60tmpfiles-paths | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/metadata/install-qa-check.d/60tmpfiles-paths 
b/metadata/install-qa-check.d/60tmpfiles-paths
index aa666dfb7ce..1d46cab6ecc 100644
--- a/metadata/install-qa-check.d/60tmpfiles-paths
+++ b/metadata/install-qa-check.d/60tmpfiles-paths
@@ -28,12 +28,12 @@ tmpfiles_check() {
        # We're now going to check for whether we install files to 
/usr/lib/tmpfiles.d without
        # inheriting the eclass (weak catch for ebuilds not calling 
tmpfiles_process in pkg_postinst)
 
-       # It's okay for some packages to do this because of circular 
dependencies and such
-       # See: 
https://archives.gentoo.org/gentoo-dev/message/0a96793036a4fdd9ac311a46950d7e7b
-       # TODO: Standardize some way of allowing ebuilds to opt-out of checks 
like this
-       local package=${CATEGORY}/${PN}
-
-       if [[ ${package} == "sys-apps/systemd" || ${package} == "sys-libs/pam" 
]] ; then
+       if [[ -n ${TMPFILES_OPTIONAL} ]] ; then
+               # While imperfect, using ${TMPFILES_OPTIONAL} is good enough to 
allow opting out
+               # for e.g. sys-apps/portage, sys-apps/systemd, sys-libs/pam, 
etc. We may want
+               # a better/more standardised way to opt out from QA checks in 
future.
+               # It's okay for some packages to do this because of circular 
dependencies and such
+               # See: 
https://archives.gentoo.org/gentoo-dev/message/0a96793036a4fdd9ac311a46950d7e7b
                return
        fi
 

Reply via email to