From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1314027-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 282C6158CB7
	for <garchives@archives.gentoo.org>; Thu, 19 Aug 2021 01:35:05 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 79CABE083B;
	Thu, 19 Aug 2021 01:35:04 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 573A8E083B
	for <gentoo-commits@lists.gentoo.org>; Thu, 19 Aug 2021 01:35:04 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 9B78C335CE9
	for <gentoo-commits@lists.gentoo.org>; Thu, 19 Aug 2021 01:35:02 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 3268D5A0
	for <gentoo-commits@lists.gentoo.org>; Thu, 19 Aug 2021 01:35:01 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1629336895.c6fc517e4bc5649e01af9d10a445338805a0cdfc.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: metadata/install-qa-check.d/
X-VCS-Repository: repo/gentoo
X-VCS-Files: metadata/install-qa-check.d/60tmpfiles-paths
X-VCS-Directories: metadata/install-qa-check.d/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: c6fc517e4bc5649e01af9d10a445338805a0cdfc
X-VCS-Branch: master
Date: Thu, 19 Aug 2021 01:35:01 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 7b553fe2-db87-4ffc-a635-c99fb21ba650
X-Archives-Hash: 15656b4f5641a5fc10f23dff9ae16e6e

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