diff options
| author | Julian Andres Klode <jak@debian.org> | 2024-11-28 18:25:02 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2024-11-28 18:25:02 +0000 |
| commit | 46e45bf1f4658075f87985d543414e45186e72d2 (patch) | |
| tree | 7259447c78be773163b348c196f9a59577f40427 /methods | |
| parent | 8d66ab29191c59baac04ef89fac30630cf9535e9 (diff) | |
| parent | 86f8353ce7a343db7b19422db0d37379ac45ff4e (diff) | |
Merge branch 'prep-bye-apt-key' into 'main'
Stop using apt-key
See merge request apt-team/apt!407
Diffstat (limited to 'methods')
| -rw-r--r-- | methods/gpgv.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/methods/gpgv.cc b/methods/gpgv.cc index 4a0866555..947b585da 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -190,6 +190,12 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, if (Debug == true) std::clog << "inside VerifyGetSigners" << std::endl; + // Abort early if we can't find gpgv, before forking further. This also + // caches the invocation of --dump-options to find the working gpgv across + // our fork() below. + if (APT::Internal::FindGPGV(Debug).first.empty()) + return "Internal error: Cannot find gpgv"; + int fd[2]; if (pipe(fd) < 0) @@ -201,9 +207,8 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile, else if (pid == 0) { std::ostringstream keys; - implodeVector(keyFiles, keys, ","); setenv("APT_KEY_NO_LEGACY_KEYRING", "1", true); - ExecGPGV(outfile, file, 3, fd, keys.str()); + ExecGPGV(outfile, file, 3, fd, keyFiles); } close(fd[1]); |
