From 858fd39f6adea6353e9367759cf48ae2b439ffcc Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 20 Apr 2012 09:52:17 +0200 Subject: * apt-pkg/aptconfiguration.cc: - if the compressor is not installed, but we link against it's library accept it as a CompressionType (Closes: #669328) --- apt-pkg/aptconfiguration.cc | 25 +++++++++++++------------ debian/changelog | 6 +++++- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index d72b0c5ae..f0cd8ebc0 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -47,6 +47,7 @@ const Configuration::getCompressionTypes(bool const &Cached) { _config->CndSet("Acquire::CompressionTypes::gz","gzip"); setDefaultConfigurationForCompressors(); + std::vector const compressors = getCompressors(); // accept non-list order as override setting for config settings on commandline std::string const overrideOrder = _config->Find("Acquire::CompressionTypes::Order",""); @@ -63,12 +64,12 @@ const Configuration::getCompressionTypes(bool const &Cached) { if (_config->Exists(std::string("Acquire::CompressionTypes::").append(*o)) == false) continue; // ignore types we have no app ready to use - std::string const appsetting = std::string("Dir::Bin::").append(*o); - if (_config->Exists(appsetting) == true) { - std::string const app = _config->FindFile(appsetting.c_str(), ""); - if (app.empty() == false && FileExists(app) == false) - continue; - } + std::vector::const_iterator c = compressors.begin(); + for (; c != compressors.end(); ++c) + if (c->Name == *o) + break; + if (c == compressors.end()) + continue; types.push_back(*o); } @@ -84,12 +85,12 @@ const Configuration::getCompressionTypes(bool const &Cached) { if (std::find(types.begin(),types.end(),Types->Tag) != types.end()) continue; // ignore types we have no app ready to use - std::string const appsetting = std::string("Dir::Bin::").append(Types->Value); - if (appsetting.empty() == false && _config->Exists(appsetting) == true) { - std::string const app = _config->FindFile(appsetting.c_str(), ""); - if (app.empty() == false && FileExists(app) == false) - continue; - } + std::vector::const_iterator c = compressors.begin(); + for (; c != compressors.end(); ++c) + if (c->Name == Types->Value) + break; + if (c == compressors.end()) + continue; types.push_back(Types->Tag); } diff --git a/debian/changelog b/debian/changelog index aa88bdd93..c65c0249c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,13 +5,17 @@ apt (0.9.2) unstable; urgency=low - only treat the native apt as essential by default (Closes: #669377) * apt-pkg/contrib/fileutl.cc: - redirect stderr from compressors to /dev/null + * apt-pkg/aptconfiguration.cc: + - if the compressor is not installed, but we link against it's + library accept it as a CompressionType (Closes: #669328) + [ Malcolm Scott ] * apt-pkg/packagemanager.cc: - iterate over all pre-depends or-group member instead of looping endlessly over the first member in SmartUnpack (LP: #985852) - -- David Kalnischkies Thu, 19 Apr 2012 22:38:02 +0200 + -- David Kalnischkies Fri, 20 Apr 2012 09:52:01 +0200 apt (0.9.1) unstable; urgency=low -- cgit v1.2.3