Gentoo Archives: gentoo-dev

From: Sam James <sam@g.o>
To: gentoo-dev@l.g.o
Cc: qa@g.o, Sam James <sam@g.o>
Subject: [gentoo-dev] [PATCH v2 3/4] metadata/install-qa-check.d: add exemptions for some packages wrt inherit
Date: Fri, 13 Aug 2021 03:44:41
Message-Id: 20210813034340.2835238-3-sam@gentoo.org
In Reply to: [gentoo-dev] [PATCH v2 1/4] metadata/install-qa-check.d: add 60tmpfiles-path QA check by Sam James
1 Both sys-apps/systemd and sys-libs/pam need to install some files
2 to these directories without inheriting the eclass.
3
4 For future work, we should have a standardised way on opting
5 out of installed files QA checks, but other QA checks are
6 already suffering from this issue.
7
8 See: https://archives.gentoo.org/gentoo-dev/message/0a96793036a4fdd9ac311a46950d7e7b
9 Signed-off-by: Sam James <sam@g.o>
10 ---
11 metadata/install-qa-check.d/60tmpfiles-paths | 8 ++++++++
12 1 file changed, 8 insertions(+)
13
14 diff --git a/metadata/install-qa-check.d/60tmpfiles-paths b/metadata/install-qa-check.d/60tmpfiles-paths
15 index 5ef56885ebe7..81286de584a2 100644
16 --- a/metadata/install-qa-check.d/60tmpfiles-paths
17 +++ b/metadata/install-qa-check.d/60tmpfiles-paths
18 @@ -30,6 +30,14 @@ tmpfiles_check() {
19 return
20 fi
21
22 + # It's okay for some packages to do this because of circular dependencies and such
23 + # See: https://archives.gentoo.org/gentoo-dev/message/0a96793036a4fdd9ac311a46950d7e7b
24 + # TODO: Standardize some way of allowing ebuilds to opt-out of checks like this
25 + local package=${CATEGORY}/${PN}
26 + if [[ ${package} == "sys-apps/systemd" || ${package} == "sys-libs/pam" ]] ; then
27 + return
28 + fi
29 +
30 if [[ -d "${ED}"/usr/lib/tmpfiles.d/ ]] ; then
31 eqawarn "QA Notice: package is installing tmpfiles without inheriting tmpfiles.eclass!"
32 eqawarn "Packages must inherit tmpfiles.eclass then call tmpfiles_process in pkg_postinst."
33 --
34 2.32.0