summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2018-01-16 16:53:46 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2018-01-17 11:52:38 +0100
commit698f9e3f9877be2aa181d6e40d3dc5c41ea318b7 (patch)
treeafcd1b5ee856242afe3de70692e358a4a6e68781 /apt-pkg/deb
parentca2fcc639c7363a04998f650b96573d806b32dd2 (diff)
Introduce inrelease-path option for sources.list
Allow specifying an alternative path to the InRelease file, so you can have multiple versions of a repository, for example. Enabling this option disables fallback to Release and Release.gpg, so setting it to InRelease can be used to ensure that only that will be tried. We add two test cases: One for checking that it works, and another for checking that the fallback does not happen. Closes: #886745
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/debmetaindex.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index 2688052a4..59a26390e 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -1092,6 +1092,10 @@ class APT_HIDDEN debSLTypeDebian : public pkgSourceList::Type /*{{{*/
if (GetBoolOption(Options, "allow-downgrade-to-insecure", _config->FindB("Acquire::AllowDowngradeToInsecureRepositories")))
ReleaseOptions.emplace("ALLOW_DOWNGRADE_TO_INSECURE", "true");
+ auto InReleasePath = Options.find("inrelease-path");
+ if (InReleasePath != Options.end())
+ ReleaseOptions.emplace("INRELEASE_PATH", InReleasePath->second);
+
debReleaseIndex * Deb = nullptr;
std::string const FileName = URItoFileName(constructMetaIndexURI(URI, Dist, "Release"));
for (auto const &I: List)