Re: Bug#816691: apt-key del 0xdeadbeef says "OK", but fails to remove the associated key
- To: deity@lists.debian.org
- Subject: Re: Bug#816691: apt-key del 0xdeadbeef says "OK", but fails to remove the associated key
- From: James McCoy <jamessan@debian.org>
- Date: Fri, 4 Mar 2016 22:49:32 -0500
- Message-id: <[🔎] 20160305034931.GA2475@freya.jamessan.com>
- In-reply-to: <145708343554.28016.17787600634206374909.reportbug__28244.5617755458$1457116427$gmane$org@alice.fifthhorseman.net>
- References: <145708343554.28016.17787600634206374909.reportbug__28244.5617755458$1457116427$gmane$org@alice.fifthhorseman.net>
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: