]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-key.in
Fix lzma write support to handle "try again" case
[apt.git] / cmdline / apt-key.in
index 80eee6265bf194ba15faa4532a90383b0e0db5d0..3ed2a70cec9f62a4f35202619bc8ea1febaf0199 100644 (file)
@@ -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="${KEY#0x}"
+
        # check if the key is in this keyring
        if ! grep -iq "^[0-9A-F]*${KEY}$" "$FINGERPRINTS"; then
            continue