[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#816691: apt-key del 0xdeadbeef says "OK", but fails to remove the associated key



On Fri, Mar 04, 2016 at 10:23:55AM +0100, Daniel Kahn Gillmor wrote:
> diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in
> index 80eee62..cfd4be3 100644
> --- a/cmdline/apt-key.in
> +++ b/cmdline/apt-key.in
> @@ -191,6 +191,10 @@ remove_key_from_keyring() {
>      for KEY in "$@"; do
>  	local FINGERPRINTS="${GPGHOMEDIR}/keyringfile.keylst"
>  	get_fingerprints_of_keyring "$KEYRINGFILE" > "$FINGERPRINTS"
> +
> +        # strip leading 0x, if present:
> +        KEY="$(printf %s "$KEY" | sed s/^0x//)"

Alternatively, KEY=${KEY#0x}

Cheers,
-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <jamessan@debian.org>


Reply to: