Ben Kibbey recently send the following to the gnupg-devel mailing. I'm adding
it here so that the issue doesn't get lost.
While looking at the code for --gen-key I noticed that gpg-agent isn't
used for getting the passphrase. Is it possible to do this? Or would
that make creating the public key impossible? I ask because --command-fd
isn't considered during --gen-key making pinentry-mode=loopback broken.
I have patches for fixing --command-fd (bjk/passphrase-inquire branches
of gpgme and gnupg) but those still don't use gpg-agent during
--gen-key. Maybe there is a reason why --gen-key isn't supposed to work
while using pinentry-mode=loopback?