From 0179cfa83cf0042235eda41db7f35c420781c63e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 7 Jan 2016 20:32:09 +0100 Subject: keep compressed indexes in a low-cost format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Downloading and storing are two different operations were different compression types can be preferred. For downloading we provide the choice via Acquire::CompressionTypes::Order as there is a choice to be made between download size and speed – and limited by whats available in the repository. Storage on the other hand has all compressions currently supported by apt available and to reduce runtime of tools accessing these files the compression type should be a low-cost format in terms of decompression. apt traditionally stores its indexes uncompressed on disk, but has options to keep them compressed. Now that apt downloads additional files we also deal with files which simply can't be stored uncompressed as they are just too big (like Contents for apt-file). Traditionally they are downloaded in a low-cost format (gz) as repositories do not provide other formats, but there might be even lower-cost formats and for download we could introduce higher-cost in the repositories. Downloading an entire index potentially requires recompression to another format, so an update takes potentially longer – but big files are usually updated via pdiffs which has to de- and re-compress anyhow and does it on the fly anyhow, so there is no extra time needed and in general it seems to be benefitial to invest the time in update to save time later on file access. --- test/integration/test-compressed-indexes | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/integration/test-compressed-indexes') diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes index b97e1244b..573a86511 100755 --- a/test/integration/test-compressed-indexes +++ b/test/integration/test-compressed-indexes @@ -7,6 +7,7 @@ TESTDIR="$(readlink -f "$(dirname "$0")")" setupenvironment configcompression '.' $(aptconfig dump APT::Compressor --format '%t %v%n' | sed -n 's#^Extension \.\(.*\)$#\1#p') configarchitecture 'i386' +LOWCOSTEXT='lz4' buildsimplenativepackage 'testpkg' 'i386' '1.0' @@ -35,10 +36,10 @@ testrun() { ! test -e rootdir/var/lib/apt/lists/*all_Packages || F=1 ! test -e rootdir/var/lib/apt/lists/*_Sources || F=1 ! test -e rootdir/var/lib/apt/lists/*_Translation-en || F=1 - test -e rootdir/var/lib/apt/lists/*i386_Packages.${COMPRESS} || F=1 - test -e rootdir/var/lib/apt/lists/*all_Packages.${COMPRESS} || F=1 - test -e rootdir/var/lib/apt/lists/*_Sources.${COMPRESS} || F=1 - test -e rootdir/var/lib/apt/lists/*_Translation-en.${COMPRESS} || F=1 + test -e rootdir/var/lib/apt/lists/*i386_Packages.$LOWCOSTEXT || F=1 + test -e rootdir/var/lib/apt/lists/*all_Packages.$LOWCOSTEXT || F=1 + test -e rootdir/var/lib/apt/lists/*_Sources.$LOWCOSTEXT || F=1 + test -e rootdir/var/lib/apt/lists/*_Translation-en.$LOWCOSTEXT || F=1 # there is no point in trying pdiff if we have compressed indexes # as we can't patch compressed files (well, we can, but what is the point?) ! test -e rootdir/var/lib/apt/lists/*diff_Index || F=1 -- cgit v1.2.3-70-g09d2