The `gpg --delete-secret-key $FPR!` command doesn't honor exact key specifications and deletes the entire key block instead.* g10/delkey.c (should_skip): New.
(do_delete_key): Skip keys other than the exact key specified by user.
When the user tries to delete a specific secret subkey
by using an exact search specification (trailing "!"),
gpg deletes the primary key and all other subkeys as well.
The new should_skip static function allows the key deletion routine
to determine when to skip keys. In this case, This can lead to accidental deletion ofkeys are skipped when
they are not the user's primary keyexact key specified by the user.
When given an exact fingerprint, `gpg` should delete that key only.Signed-off-by: Matheus Afonso Martins Moreira <firstname.lastname@example.org>