#994939 Insists on updating trustdb when only listing keys in a keyring

Package:
gpg
Source:
gnupg2
Description:
GNU Privacy Guard -- minimalist public key operations
Submitter:
Steve McIntyre
Date:
2021-09-23 14:27:04 UTC
Severity:
important
Tags:
#994939#5
Date:
2021-09-23 14:21:50 UTC
From:
To:
Hi!

Working on an embedded system, I want to list the keys contained in a
keyring. gpg insists on creating a trustdb for no reason:

# gpg --no-auto-check-trustdb --no-default-keyring --keyring /etc/apt/trusted.gpg.d/pexip-as.gpg  --list-keys
gpg: directory '/root/.gnupg' created
gpg: /root/.gnupg/trustdb.gpg: trustdb created
...
<keys>
...

Why? Even better, if I try to force no output by using /dev/null for
the trustdb I get a crash:
# gpg --no-auto-check-trustdb --trustdb-name /dev/null --no-default-keyring --keyring /etc/apt/trusted.gpg.d/pexip-as.gpg  --list-keys
gpg: Ohhhh jeeee: Assertion "recnum" in create_hashtable failed (../../g10/tdbio.c:856)
Aborted (core dumped)

This is not great... :-(