commit:     acddec7349261e9045a622d6a658d7101461275e
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Fri Jun 20 03:49:44 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 20 05:45:38 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=acddec73

emerge-webrsync: rename WEBRSYNC_VERIFY_SIGNATURE to verification_method

Rename the 'WEBRSYNC_VERIFY_SIGNATURE' variable to
'verification_method'. The choice of a lowercase name reduces the
probability of a namespace conflict and clarifies that the variable is
not expected to be defined by the parent process. It also better conveys
the nature of the variable, in so far as its value is used to
distinguish between distinct verification methods.

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/emerge-webrsync | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index f910e27327..88b26d4b90 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -126,7 +126,7 @@ handle_pgp_setup() {
                # Disable PGP verification. The webrsync module specifies this
                # option if the "sync-webrsync-verify-signature" repo attribute
                # is explicitly defined with a value of "false".
-               WEBRSYNC_VERIFY_SIGNATURE=0
+               verification_method=0
        elif contains_word webrsync-gpg "${FEATURES}"; then
                # Discourage the use of the deprecated "webrsync-gpg" feature
                # because it prevents the use of gemato for verification.
@@ -134,19 +134,19 @@ handle_pgp_setup() {
                if [[ ! ${PORTAGE_GPG_DIR} ]]; then
                        die "PORTAGE_GPG_DIR is unset or empty (the 
webrsync-gpg feature requires that it be set)"
                fi
-               WEBRSYNC_VERIFY_SIGNATURE=2
+               verification_method=2
        elif ! hash gemato 2>/dev/null; then
                # Fall back to conventional verification with gpg(1).
                ewarn "app-portage/gemato does not appear to be installed. 
Falling back to gpg."
-               WEBRSYNC_VERIFY_SIGNATURE=2
+               verification_method=2
        else
                # Use gemato for PGP verification. It is the preferred method
                # because it handles key refresh and revocation, and guarantees
                # a clean operating environment.
-               WEBRSYNC_VERIFY_SIGNATURE=1
+               verification_method=1
        fi
 
-       case "${WEBRSYNC_VERIFY_SIGNATURE}" in
+       case ${verification_method} in
                0)
                        if (( ! opt[quiet] )); then
                                ewarn "PGP verification method: disabled"
@@ -357,7 +357,7 @@ gpg_verify() {
 check_file_signature() {
        local signature=$1 file=$2
 
-       case ${WEBRSYNC_VERIFY_SIGNATURE} in
+       case ${verification_method} in
                [12])
                        einfo "Checking signature ..."
                        ;;&

Reply via email to