Skip to content
Snippets Groups Projects
Commit 9cca3e8f authored by Guillem Jover's avatar Guillem Jover
Browse files

Dpkg::OpenPGP::Backend::GnuPG: Touch trustedkeys.gpg on temporary gpg home

The gpgv command expects a trustedkeys.gpg keyring, and if there is none
it will try the trustedkeys.kbx one, but then will emit an error such as:

  gpgv: unknown type of key resource 'trustedkeys.kbx'
  gpgv: keyblock resource '<GPGHOME>/trustedkeys.kbx': General error

This error will only show if the gpgv invocation failed for other
reasons, but it is still an unnecessary distraction. Avoid that error,
by touching the trustedkeys.gpg keyring.
parent 92e6049c
No related branches found
No related tags found
1 merge request!4Update crimson to version from bookworm
......@@ -213,6 +213,9 @@ sub _gpg_verify {
my @exec;
if ($self->{cmdv}) {
push @exec, $self->{cmdv};
# We need to touch the trustedkeys.gpg keyring, otherwise gpgv will
# emit an error about the trustedkeys.kbx file being of unknown type.
file_touch("$gpg_home/trustedkeys.gpg");
} else {
push @exec, $self->{cmd};
push @exec, qw(--no-options --no-default-keyring --batch --quiet);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment