[pacman-dev] [PATCH 6/7] pacman-key: rename --trust to --edit-key

Allan McRae allan at archlinux.org
Fri Jul 8 07:59:31 EDT 2011


This keeps the naming of the option more consistent with what is
actually being called by gpg.

Original-patch-by: Denis A. Altoé Falqueto <denisfalqueto at gmail.com>
Signed-off-by: Allan McRae <allan at archlinux.org>
---
 scripts/pacman-key.sh.in |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in
index b15a3a5..9017ea9 100644
--- a/scripts/pacman-key.sh.in
+++ b/scripts/pacman-key.sh.in
@@ -29,12 +29,12 @@ myver="@PACKAGE_VERSION@"
 # Options
 ADD=0
 DELETE=0
+EDITKEY=0
 EXPORT=0
 FINGER=0
 LIST=0
 RECEIVE=0
 RELOAD=0
-TRUST=0
 UPDATEDB=0
 
 m4_include(library/output_format.sh)
@@ -56,11 +56,11 @@ usage() {
 	echo "$(gettext "  -h, --help                Show this help message and exit")"
 	echo "$(gettext "  -l, --list                List keys")"
 	echo "$(gettext "  -r, --receive <keyserver> <keyid(s)> Fetch the specified keyids")"
-	echo "$(gettext "  -t, --trust <keyid(s)>    Set the trust level of the given keyids")"
 	echo "$(gettext "  -u, --updatedb            Update the trustdb of pacman")"
 	echo "$(gettext "  -V, --version             Show program version")"
 	echo "$(gettext "  --config <file>           Use an alternate config file")"
 	printf "$(gettext "                                    (instead of '%s')")\n" "@sysconfdir@/pacman.conf"
+	echo "$(gettext "  --edit-key <keyid(s)>     Present a menu for key management task on keyids")"
 	echo "$(gettext "  --gpgdir <dir>            Set an alternate directory for gnupg")"
 	printf "$(gettext "                                    (instead of '%s')")\n" "@sysconfdir@/pacman.d/gnupg"
 	echo "$(gettext "  --reload                  Reload the default keys")"
@@ -228,13 +228,13 @@ while true; do
 		-a|--add)         ADD=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYFILES=($1) ;;
 		--config)         shift; CONFIG=$1 ;;
 		-d|--delete)      DELETE=1; shift; KEYIDS=($1) ;;
+		--edit-key)       EDITKEY=1; shift; KEYIDS=($1) ;;
 		-e|--export)      EXPORT=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYIDS=($1) ;;
 		-f|--finger)      FINGER=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYIDS=($1) ;;
 		--gpgdir)         shift; PACMAN_KEYRING_DIR=$1 ;;
 		-l|--list)        LIST=1 ;;
 		-r|--receive)     RECEIVE=1; shift; KEYSERVER="${1[0]}"; KEYIDS=("${1[@]:1}") ;;
 		--reload)         RELOAD=1 ;;
-		-t|--trust)       TRUST=1; shift; KEYIDS=($1) ;;
 		-u|--updatedb)    UPDATEDB=1 ;;
 
 		-h|--help)        usage; exit 0 ;;
@@ -252,7 +252,7 @@ if ! type -p gpg >/dev/null; then
 	exit 1
 fi
 
-if (( (ADD || DELETE || RECEIVE || RELOAD || TRUST || UPDATEDB) && EUID != 0 )); then
+if (( (ADD || DELETE || EDITKEY || RECEIVE || RELOAD || UPDATEDB) && EUID != 0 )); then
 	error "$(gettext "%s needs to be run as root for this operation.")" "pacman-key"
 	exit 1
 fi
@@ -293,7 +293,7 @@ if (( RECEIVE )); then
 	${GPG_PACMAN} --keyserver "$KEYSERVER" --recv-keys "${KEYIDS[@]}"
 fi
 
-if (( TRUST )); then
+if (( EDITKEY )); then
 		for key in ${KEYIDS[@]}; do
 			# Verify if the key exists in pacman's keyring
 			if ${GPG_PACMAN} --list-keys "$key" > /dev/null 2>&1; then
-- 
1.7.6



More information about the pacman-dev mailing list