commit:     df797d3dd66cdacf58eb672f40f877f3870b9ae9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May  1 06:50:59 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May  1 07:20:58 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=df797d3d

emerge-webrsync: respect PORTAGE_GPG_KEY_SERVER

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

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 4546f510c..f1fb012c2 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -279,11 +279,17 @@ check_file_signature_gemato() {
                        local 
key="${EPREFIX:-/}"/usr/share/openpgp-keys/gentoo-release.asc
                fi
 
+               local keyserver
+               if [[ -n ${PORTAGE_GPG_KEY_SERVER} ]] ; then
+                       keyserver="--keyserver ${PORTAGE_GPG_KEY_SERVER}"
+               fi
+
                local gemato_args=(
                        openpgp-verify-detached
                        -K "${key}"
                )
 
+               [[ -n ${PORTAGE_GPG_KEY_SERVER} ]] && gemato_args+=( 
--keyserver "${PORTAGE_GPG_KEY_SERVER}" )
                # Portage is calling us so it'll handle refreshing if 
configured to do so.
                # Don't repeat its work.
                [[ -n ${PORTAGE_TEMP_GPG_DIR} ]] && gemato_args+=( 
--no-refresh-keys --no-wkd )
@@ -291,7 +297,7 @@ check_file_signature_gemato() {
                [[ ${PORTAGE_QUIET} == 1 ]] && gemato_args+=( --quiet )
                [[ ${do_debug} == 1 ]] && gemato_args+=( --debug )
 
-               gemato "${gemato_args[@]}" "${signature}" "${file}"
+               gemato "${gemato_args[@]}" -- "${signature}" "${file}"
                r=$?
 
                if [[ ${r} -ne 0 ]]; then

Reply via email to