diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2012-04-05 19:02:08 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2012-04-05 19:02:08 +0200 |
commit | 8dd623dbd616ee23dc96a2c99a4415b153dd7290 (patch) | |
tree | e53d6eac0864b2b8f083d288863d34a5d6c3b4f2 | |
parent | d6bbcaad675a746e958d0736ead63bf44c2787ee (diff) |
if we have zlib builtin insert add a dummy gzip compressor for FileFD
-rw-r--r-- | apt-pkg/aptconfiguration.cc | 4 | ||||
-rw-r--r-- | apt-pkg/contrib/fileutl.cc | 1 | ||||
-rw-r--r-- | debian/changelog | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 2fdb837c5..f00852775 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -477,6 +477,10 @@ const Configuration::getCompressors(bool const Cached) { compressors.push_back(Compressor(".", "", "", "", "", 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","/bin/false", "", "", 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)); if (_config->Exists("Dir::Bin::xz") == false || FileExists(_config->FindFile("Dir::Bin::xz")) == true) diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 691657cb4..30d0b6662 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -829,7 +829,6 @@ bool FileFd::Open(string FileName,unsigned int const Mode,CompressMode Compress, if (Compress == Auto && (Mode & WriteOnly) == WriteOnly) return _error->Error("Autodetection on %s only works in ReadOnly openmode!", FileName.c_str()); - // FIXME: Denote inbuilt compressors somehow - as we don't need to have the binaries for them std::vector<APT::Configuration::Compressor> const compressors = APT::Configuration::getCompressors(); std::vector<APT::Configuration::Compressor>::const_iterator compressor = compressors.begin(); if (Compress == Auto) diff --git a/debian/changelog b/debian/changelog index 8e7b41796..f40b425f8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -61,6 +61,7 @@ apt (0.8.16~exp14) UNRELEASED; urgency=low which can be translated to apt.ent * apt-pkg/aptconfiguration.cc: - if present, prefer xz binary over lzma + - if we have zlib builtin insert add a dummy gzip compressor for FileFD * methods/bzip2.cc: - remove it as the functionality for all compressors can be provided by gzip.cc now with the usage of FileFD @@ -73,7 +74,7 @@ apt (0.8.16~exp14) UNRELEASED; urgency=low number of auto-removed packages both before and after the list of packages (Closes: #665833) - -- David Kalnischkies <kalnischkies@gmail.com> Thu, 05 Apr 2012 18:49:35 +0200 + -- David Kalnischkies <kalnischkies@gmail.com> Thu, 05 Apr 2012 19:00:43 +0200 apt (0.8.16~exp13) experimental; urgency=low |