From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1517346-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 5F8EA158649
	for <garchives@archives.gentoo.org>; Thu, 11 May 2023 01:24:51 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 8D647E0BED;
	Thu, 11 May 2023 01:24:50 +0000 (UTC)
Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 729AAE0BED
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 May 2023 01:24:50 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 9A3ED340D01
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 May 2023 01:24:49 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 0F4868E4
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 May 2023 01:24:48 +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: <1683768281.595a73259025589c65af837ce23d994523242d45.sam@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: bin/install-qa-check.d/
X-VCS-Repository: proj/portage
X-VCS-Files: bin/install-qa-check.d/90config-impl-decl
X-VCS-Directories: bin/install-qa-check.d/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 595a73259025589c65af837ce23d994523242d45
X-VCS-Branch: master
Date: Thu, 11 May 2023 01:24:48 +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: 7557301f-52bf-4b52-97e8-d01832fbb990
X-Archives-Hash: 2481a928901821a3aa4ff737c7d11027

commit:     595a73259025589c65af837ce23d994523242d45
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed May 10 00:35:13 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 11 01:24:41 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=595a7325

install-qa-check.d/90config-impl-decl: Allow wildcards in QA_CONFIG_IMPL_DECL_SKIP

This will enable us to ignore all __builtin_* functions, for example.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/install-qa-check.d/90config-impl-decl | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/bin/install-qa-check.d/90config-impl-decl b/bin/install-qa-check.d/90config-impl-decl
index 0e758e87d..7eb7dcff9 100644
--- a/bin/install-qa-check.d/90config-impl-decl
+++ b/bin/install-qa-check.d/90config-impl-decl
@@ -19,6 +19,18 @@
 #
 # See also: bug 892651
 
+# Same as the "has" function, but allows wildcards in the array
+is_in() {
+	local needle=$1
+	shift
+
+	local x
+	for x in "$@"; do
+		[[ "${needle}" = ${x} ]] && return 0
+	done
+	return 1
+}
+
 find_log_targets() {
 	local log_targets=(
 		'config.log'
@@ -80,7 +92,7 @@ config_impl_decl_check() {
 				continue
 			fi
 
-			has "${func}" "${QA_CONFIG_IMPL_DECL_SKIP[@]}" && continue
+			is_in "${func}" "${QA_CONFIG_IMPL_DECL_SKIP[@]}" && continue
 
 			files+=( "${l}" )
 			lines+=( "${line}" )