From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1513652-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 8894115ACFC
	for <garchives@archives.gentoo.org>; Mon,  1 May 2023 07:22:02 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 82D42E084F;
	Mon,  1 May 2023 07:22:01 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(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 6550EE0849
	for <gentoo-commits@lists.gentoo.org>; Mon,  1 May 2023 07:22:01 +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) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 6AAB03414C8
	for <gentoo-commits@lists.gentoo.org>; Mon,  1 May 2023 07:22:00 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id C0374A5B
	for <gentoo-commits@lists.gentoo.org>; Mon,  1 May 2023 07:21:58 +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: <1682925657.47abd292da1f2b0bded9f7d4ad21130d18d4a719.sam@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: bin/
X-VCS-Repository: proj/portage
X-VCS-Files: bin/emerge-webrsync
X-VCS-Directories: bin/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 47abd292da1f2b0bded9f7d4ad21130d18d4a719
X-VCS-Branch: master
Date: Mon,  1 May 2023 07:21:58 +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: 2c91f15d-e06e-439c-a170-b941ea9dff57
X-Archives-Hash: b3852da9b7553ef3b2bff2963b496894

commit:     47abd292da1f2b0bded9f7d4ad21130d18d4a719
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 30 05:30:13 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May  1 07:20:57 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=47abd292

emerge-webrsync: respect PORTAGE_GPG_KEY

This will allow us to switch the Portage-caller cases to the
gemato path because we now respect 'sync-openpgp-key-path'.

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

 bin/emerge-webrsync | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 11d6937cd..b59b728c6 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -272,9 +272,15 @@ check_file_signature_gemato() {
 	local r=1
 
 	if type -P gemato > /dev/null; then
+		if [[ -n ${PORTAGE_GPG_KEY} ]] ; then
+			local key="${PORTAGE_GPG_KEY}"
+		else
+			local key="${EPREFIX:-/}"/usr/share/openpgp-keys/gentoo-release.asc
+		fi
+
 		local gemato_args=(
 			openpgp-verify-detached
-			-K "${EPREFIX:-/}"/usr/share/openpgp-keys/gentoo-release.asc
+			-K "${key}"
 		)
 
 		[[ ${PORTAGE_QUIET} == 1 ]] && gemato_args+=( --quiet )