summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-12-28 21:50:13 +0100
committerJulian Andres Klode <jak@debian.org>2015-12-28 21:50:13 +0100
commit1a3296c0bd67c46c6ff791345b6101edcb97e778 (patch)
treedece62aa0c7f83bb7ad71eee67c31b95a138ad4a /apt-pkg
parentff2717e8c6a7633bbd38be95b2d30615802b6679 (diff)
downloadapt-1a3296c0bd67c46c6ff791345b6101edcb97e778.tar.gz
aptconfiguration: Set default compression level to 6
Since commit 7a68effcb904b4424b54a30e448b6f2560cd1078, the xz and lzma compressors read the level of compression they shall use. A default of -9 is too much for them, this will use 674 MB, according to the xz manual page. Level -6 on the other hand only needs 94 MB memory for compression. This causes autopkgtest failures in the test-compressed-indexes test, as not enough memory exists to proceed. Change the other compression levels to 6 as well: The gzip and bzip2 FileFd backends do not read them, and use their code's default level which is 6, so do the same for external methods.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/aptconfiguration.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc
index 74f88640c..d37ac2537 100644
--- a/apt-pkg/aptconfiguration.cc
+++ b/apt-pkg/aptconfiguration.cc
@@ -42,7 +42,7 @@ static void setDefaultConfigurationForCompressors() {
_config->Set("APT::Compressor::lzma::Binary", "xz");
if (_config->Exists("APT::Compressor::lzma::CompressArg") == false) {
_config->Set("APT::Compressor::lzma::CompressArg::", "--format=lzma");
- _config->Set("APT::Compressor::lzma::CompressArg::", "-9");
+ _config->Set("APT::Compressor::lzma::CompressArg::", "-6");
}
if (_config->Exists("APT::Compressor::lzma::UncompressArg") == false) {
_config->Set("APT::Compressor::lzma::UncompressArg::", "--format=lzma");
@@ -52,7 +52,7 @@ static void setDefaultConfigurationForCompressors() {
_config->CndSet("Dir::Bin::lzma", "/usr/bin/lzma");
if (_config->Exists("APT::Compressor::lzma::CompressArg") == false) {
_config->Set("APT::Compressor::lzma::CompressArg::", "--suffix=");
- _config->Set("APT::Compressor::lzma::CompressArg::", "-9");
+ _config->Set("APT::Compressor::lzma::CompressArg::", "-6");
}
if (_config->Exists("APT::Compressor::lzma::UncompressArg") == false) {
_config->Set("APT::Compressor::lzma::UncompressArg::", "--suffix=");
@@ -366,7 +366,7 @@ const Configuration::getCompressors(bool const Cached) {
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));
+ compressors.push_back(Compressor("gzip",".gz","gzip","-6n","-d",2));
#ifdef HAVE_ZLIB
else
compressors.push_back(Compressor("gzip",".gz","false", NULL, NULL, 2));
@@ -378,13 +378,13 @@ const Configuration::getCompressors(bool const Cached) {
compressors.push_back(Compressor("xz",".xz","false", NULL, NULL, 3));
#endif
if (_config->Exists("Dir::Bin::bzip2") == false || FileExists(_config->FindFile("Dir::Bin::bzip2")) == true)
- compressors.push_back(Compressor("bzip2",".bz2","bzip2","-9","-d",4));
+ compressors.push_back(Compressor("bzip2",".bz2","bzip2","-6","-d",4));
#ifdef HAVE_BZ2
else
compressors.push_back(Compressor("bzip2",".bz2","false", NULL, NULL, 4));
#endif
if (_config->Exists("Dir::Bin::lzma") == false || FileExists(_config->FindFile("Dir::Bin::lzma")) == true)
- compressors.push_back(Compressor("lzma",".lzma","lzma","-9","-d",5));
+ compressors.push_back(Compressor("lzma",".lzma","lzma","-6","-d",5));
#ifdef HAVE_LZMA
else
compressors.push_back(Compressor("lzma",".lzma","false", NULL, NULL, 5));