X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/858fd39f6adea6353e9367759cf48ae2b439ffcc..e1284a59de37efeedcc998ef61e8466c35b82eb2:/apt-pkg/aptconfiguration.cc diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index f0cd8ebc0..0fd470ed5 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; @@ -475,18 +477,18 @@ const Configuration::getCompressors(bool const Cached) { setDefaultConfigurationForCompressors(); - compressors.push_back(Compressor(".", "", "", "", "", 1)); + compressors.push_back(Compressor(".", "", "", NULL, NULL, 1)); if (_config->Exists("Dir::Bin::gzip") == false || FileExists(_config->FindFile("Dir::Bin::gzip")) == true) compressors.push_back(Compressor("gzip",".gz","gzip","-9n","-d",2)); #ifdef HAVE_ZLIB else - compressors.push_back(Compressor("gzip",".gz","false", "", "", 2)); + compressors.push_back(Compressor("gzip",".gz","false", NULL, NULL, 2)); #endif if (_config->Exists("Dir::Bin::bzip2") == false || FileExists(_config->FindFile("Dir::Bin::bzip2")) == true) compressors.push_back(Compressor("bzip2",".bz2","bzip2","-9","-d",3)); #ifdef HAVE_BZ2 else - compressors.push_back(Compressor("bzip2",".bz2","false", "", "", 3)); + compressors.push_back(Compressor("bzip2",".bz2","false", NULL, NULL, 3)); #endif if (_config->Exists("Dir::Bin::xz") == false || FileExists(_config->FindFile("Dir::Bin::xz")) == true) compressors.push_back(Compressor("xz",".xz","xz","-6","-d",4));