summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2011-07-06 03:27:23 +1000
committerAllan McRae <allan@archlinux.org>2011-07-19 10:27:53 +1000
commit95d7e1616361ab2b2be38ba5283328f6f9312012 (patch)
treed477769d4608355a12be681929ae3a79e51362a1
parent7d205a70a26f1c3d283e995ec590b6838eb8283d (diff)
downloadpacman-95d7e1616361ab2b2be38ba5283328f6f9312012.tar.xz
pacman-key: remove the --adv option
The conversion to using parse_options causes this option to break. It is preferable to remove the option rather than fix it as it is simply a wrapper for "gpg --homedir @sysconfdir@/pacman.d/gnupg". Any user using more advanced keyring management than provided by pacman-key can manage to point gpg at the right place themselves... How to manually edit the keyring with gpg will instead be documented in the man page in a later commit. Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--scripts/pacman-key.sh.in13
1 files changed, 2 insertions, 11 deletions
diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in
index 4056451f..a55cd7ef 100644
--- a/scripts/pacman-key.sh.in
+++ b/scripts/pacman-key.sh.in
@@ -28,7 +28,6 @@ myver="@PACKAGE_VERSION@"
# Options
ADD=0
-ADVANCED=0
DELETE=0
EXPORT=0
FINGER=0
@@ -60,7 +59,6 @@ usage() {
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 " --adv <params> Use pacman's keyring with advanced gpg commands")"
echo "$(gettext " --config <file> Use an alternate config file")"
printf "$(gettext " (instead of '%s')")\n" "@sysconfdir@/pacman.conf"
echo "$(gettext " --gpgdir <dir> Set an alternate directory for gnupg")"
@@ -212,7 +210,7 @@ if ! type gettext &>/dev/null; then
fi
OPT_SHORT="a::d:e:f::hlr:t:uV"
-OPT_LONG="add::,adv:,config:,del:,export:,finger::,gpgdir:,help,list"
+OPT_LONG="add::,config:,del:,export:,finger::,gpgdir:,help,list"
OPT_LONG+=",receive:,reload,trust:,updatedb,version"
if ! OPT_TEMP="$(parse_options $OPT_SHORT $OPT_LONG "$@")"; then
echo; usage; exit 1 # E_INVALID_OPTION;
@@ -228,7 +226,6 @@ fi
while true; do
case "$1" in
-a|--add) ADD=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYFILES=($1) ;;
- --adv) ADVANCED=1; shift; ARGUMENTS=($1) ;;
--config) shift; CONFIG=$1 ;;
-d|--del) DELETE=1; shift; KEYIDS=($1) ;;
-e|--export) EXPORT=1; shift; KEYIDS=($1) ;;
@@ -255,7 +252,7 @@ if ! type -p gpg >/dev/null; then
exit 1
fi
-if (( (ADD || ADVANCED || DELETE || RECEIVE || RELOAD || TRUST || UPDATEDB) && EUID != 0 )); then
+if (( (ADD || DELETE || RECEIVE || RELOAD || TRUST || UPDATEDB) && EUID != 0 )); then
error "$(gettext "%s needs to be run as root for this operation.")" "pacman-key"
exit 1
fi
@@ -288,12 +285,6 @@ GPG_PACMAN="gpg --homedir ${PACMAN_KEYRING_DIR} --no-permission-warning"
(( RELOAD )) && reload_keyring
(( UPDATEDB )) && ${GPG_PACMAN} --batch --check-trustdb
-if (( ADVANCED )); then
- msg "$(gettext "Executing: %s %s")" "${GPG_PACMAN}" "${ARGUMENTS[@]}"
- ${GPG_PACMAN} "${ARGUMENTS[@]}" || ret=$?
- exit $ret
-fi
-
if (( RECEIVE )); then
if [[ -z ${KEYIDS[@]} ]]; then
error "$(gettext "You need to specify the keyserver and at least one key identifier")"