diff options
author | Julian Andres Klode <jak@debian.org> | 2016-08-18 10:02:35 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-08-18 10:02:35 +0200 |
commit | d1fd09b982f6108dc32ec75330b0535236c48311 (patch) | |
tree | c0dce6cf7501c1e0d5e3bad34e9b63c0d6dcd354 /cmdline | |
parent | b5fcba3682581b2a48921cc830dbf3deae6b0ff3 (diff) | |
parent | 43670e2ef8b689d9efba633d11d2a5fc6f9968a0 (diff) |
Merge tag '1.3_rc2' into ubuntu
apt Debian release 1.3~rc2
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-key.in | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in index 0f9118492..81314c7f5 100644 --- a/cmdline/apt-key.in +++ b/cmdline/apt-key.in @@ -200,8 +200,8 @@ remove_key_from_keyring() { local FINGERPRINTS="${GPGHOMEDIR}/keyringfile.keylst" get_fingerprints_of_keyring "$KEYRINGFILE" > "$FINGERPRINTS" - # strip leading 0x, if present: - KEY="${KEY#0x}" + # strip leading 0x, if present: + KEY="$(echo "${KEY#0x}" | tr -d ' ')" # check if the key is in this keyring if ! grep -iq "^[0-9A-F]*${KEY}$" "$FINGERPRINTS"; then @@ -530,9 +530,11 @@ EOF GPG_EXE="gpg" elif command_available 'gpg2'; then GPG_EXE="gpg2" + elif command_available 'gpg1'; then + GPG_EXE="gpg1" else - echo >&2 "Error: gnupg or gnupg2 do not seem to be installed," - echo >&2 "Error: but apt-key requires gnupg or gnupg2 for this operation." + echo >&2 "Error: gnupg, gnupg2 and gnupg1 do not seem to be installed," + echo >&2 "Error: but apt-key requires gnupg, gnupg2 or gnupg1 for this operation." echo >&2 exit 255 fi @@ -639,8 +641,9 @@ case "$command" in if [ -n "$GPGV" ] && command_available "$GPGV"; then true; elif command_available 'gpgv'; then GPGV='gpgv'; elif command_available 'gpgv2'; then GPGV='gpgv2'; + elif command_available 'gpgv1'; then GPGV='gpgv1'; else - echo >&2 'ERROR: gpgv or gpgv2 required for verification' + echo >&2 'ERROR: gpgv, gpgv2 or gpgv1 required for verification' exit 29 fi # for a forced keyid we need gpg --export, so full wrapping required |