From: David Kalnischkies Date: Fri, 20 Apr 2012 09:05:35 +0000 (+0200) Subject: fix a bug uncovered by the previous commit which checks if a Compressor X-Git-Tag: 0.9.2~1^2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/79b207bc0a3a7d9cef91f96e6061ea35451c563a fix a bug uncovered by the previous commit which checks if a Compressor preference given by the Order setting is really available before adding it as possible CompressionType. --- diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index f0cd8ebc0..e1225b3e6 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -61,12 +61,14 @@ const Configuration::getCompressionTypes(bool const &Cached) { if ((*o).empty() == true) continue; // ignore types we have no method ready to use - if (_config->Exists(std::string("Acquire::CompressionTypes::").append(*o)) == false) + std::string const method = std::string("Acquire::CompressionTypes::").append(*o); + if (_config->Exists(method) == false) continue; // ignore types we have no app ready to use + std::string const app = _config->Find(method); std::vector::const_iterator c = compressors.begin(); for (; c != compressors.end(); ++c) - if (c->Name == *o) + if (c->Name == app) break; if (c == compressors.end()) continue;