I was informed by a Debian user that the following command fails if the GnuPG
homedir does not exist (adjusted so you can reproduce; /tmp/.gnupg does not exist):
HOME=/tmp --no-default-keyring --keyring somekeyring.gpg --verify sig file
gpg: Signature made Thu Dec 10 16:21:33 2009 CET using RSA key ID 55BE302B
gpg: directory `/tmp/.gnupg' created
gpg: new configuration file `/tmp/.gnupg/gpg.conf' created
gpg: WARNING: options in `/tmp/.gnupg/gpg.conf' are not yet active during this run
gpg: fatal: /tmp/.gnupg: directory does not exist!
secmem usage: 1408/1408 bytes in 2/2 blocks of pool 1408/32768
Now consider the same example but without the --*keyring switches:
HOME=/tmp --verify sig file
gpg: directory `/tmp/.gnupg' created
gpg: new configuration file `/tmp/.gnupg/gpg.conf' created
gpg: WARNING: options in `/tmp/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/tmp/.gnupg/pubring.gpg' created
gpg: Signature made Thu Dec 10 16:21:33 2009 CET using RSA key ID 55BE302B
gpg: Can't check signature: public key not found
So the latter case works whereas the first one fails with a fvatal error. But in
both cases, the keyring exists - the given keyring in the first and the created
in the second example.