summaryrefslogtreecommitdiff
path: root/methods/sqv.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-01-22 09:17:23 +0000
committerJulian Andres Klode <jak@debian.org>2025-01-22 09:17:23 +0000
commit0c07c8f38e320e8f8b303011813018f8f02beed8 (patch)
tree9414ac9ba3395e04a55c1ebb99405f36e48ed500 /methods/sqv.cc
parent61f8f40f921cde13c5b97abbdf900646745e8e30 (diff)
parent09c76cb29b61e1d523a30287f8a9bf0cb0b608e7 (diff)
Merge branch 'no-fail-missing-parts' into 'main'
sqv, gpgv: Do not fail if Dir::Etc::Trusted is set and trusted.gpg.d is missing See merge request apt-team/apt!433
Diffstat (limited to 'methods/sqv.cc')
-rw-r--r--methods/sqv.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/methods/sqv.cc b/methods/sqv.cc
index 9dbe75994..3191752cc 100644
--- a/methods/sqv.cc
+++ b/methods/sqv.cc
@@ -132,9 +132,20 @@ bool SQVMethod::VerifyGetSigners(const char *file, const char *outfile,
};
if (keyFiles.empty())
{
+ // Either trusted or trustedparts must exist
+ _error->PushToStack();
auto Parts = GetListOfFilesInDir(_config->FindDir("Dir::Etc::TrustedParts"), std::vector<std::string>{"gpg", "asc"}, true);
if (auto trusted = _config->FindFile("Dir::Etc::Trusted"); not trusted.empty())
+ {
+ std::string s;
+ strprintf(s, "Loading %s from deprecated option Dir::Etc::Trusted\n", trusted.c_str());
+ Warning(std::move(s));
Parts.push_back(trusted);
+ }
+ if (Parts.empty())
+ _error->MergeWithStack();
+ else
+ _error->RevertToStack();
for (auto &Part : Parts)
{
if (Debug)