The following command returns a gpg fatal error regarding being unable to open
trustdb.gpg even though trusted.gpg ends up containing the key being imported.
$ /usr/bin/gpg --no-default-keyring --no-auto-check-trustdb --trust-model
always --keyring /tmp/trusted.gpg --secret-keyring /tmp/secring.gpg
--trustdb-name /tmp/trustdb.gpg --quiet --batch --import
/home/bdmurray/source-trees/software-properties/upstream/tests/data/testkey.gpg
This is true whether or not --trustdb-name is provided as an argument:
$ /usr/bin/gpg --no-default-keyring --no-auto-check-trustdb --trust-model
always --keyring /tmp/trusted.gpg --secret-keyring /tmp/secring.gpg --quiet
--batch --import
/home/bdmurray/source-trees/software-properties/upstream/tests/data/testkey.gpg
gpg: fatal: can't open `/home/bdmurray/.gnupg/trustdb.gpg': No such file or
directory
I believe these changes are related to the Changelog entry from 2013-10-11
regarding trustdb. A similar issue has been reported in the debian bug tracker:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737128&archived=no&mbox=no
I've been testing this on the development release of Ubuntu using gnupg version
1.4.16-1ubuntu1.