From 1a3a14ac63b0c4f18de53a7bddcf79d20a5e814f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 27 Aug 2015 18:13:00 +0200 Subject: sources.list and indextargets option for pdiffs Disabling pdiffs can be useful occasionally, like if you have a fast local mirror where the download doesn't matter, but still want to use it for non-local mirrors. Also, some users might prefer it to only use it for very big indextargets like Contents. --- apt-pkg/indexfile.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apt-pkg/indexfile.cc') diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc index 8e50ecfae..b81893260 100644 --- a/apt-pkg/indexfile.cc +++ b/apt-pkg/indexfile.cc @@ -143,6 +143,7 @@ std::string IndexTarget::Option(OptionKeys const EnumKey) const /*{{{*/ APT_CASE(REPO_URI); APT_CASE(TARGET_OF); APT_CASE(CREATED_BY); + APT_CASE(PDIFFS); #undef APT_CASE case FILENAME: return _config->FindDir("Dir::State::lists") + URItoFileName(URI); case EXISTING_FILENAME: @@ -164,6 +165,11 @@ std::string IndexTarget::Option(OptionKeys const EnumKey) const /*{{{*/ return M->second; } /*}}}*/ +bool IndexTarget::OptionBool(OptionKeys const EnumKey) const /*{{{*/ +{ + return StringToBool(Option(EnumKey)); +} + /*}}}*/ std::string IndexTarget::Format(std::string format) const /*{{{*/ { for (std::map::const_iterator O = Options.begin(); O != Options.end(); ++O) -- cgit v1.2.3