]> git.saurik.com Git - apt.git/commit
allow individual targets to be kept compressed
authorDavid Kalnischkies <david@kalnischkies.de>
Tue, 30 Jun 2015 08:53:51 +0000 (10:53 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 10 Aug 2015 15:25:26 +0000 (17:25 +0200)
commit653ef26c70dc9c0e2cbfdd4e79117876bb63e87d
treed9fbea48e857abca5e1e91751b9ec7174364cf20
parent525bcd780d0284d980db805c62254e7d27507345
allow individual targets to be kept compressed

There is an option to keep all targets (Packages, Sources, …) compressed
for a while now, but the all-or-nothing approach is a bit limited for
our purposes with additional targets as some of them are very big
(Contents) and rarely used in comparison, so keeping them compressed by
default can make sense, while others are still unpacked.

Most interesting is the copy-change maybe: Copy is used by the acquire
system as an uncompressor and it is hence expected that it returns the
hashes for the "output", not the input. Now, in the case of keeping a
file compressed, the output is never written to disk, but generated in
memory and we should still validated it, so for compressed files copy is
expected to return the hashes of the uncompressed file. We used to use
the config option to enable on-the-fly decompress in the method, but in
reality copy is never used in a way where it shouldn't decompress a
compressed file to get its hashes, so we can save us the trouble of
sending this information to the method and just do it always.
apt-pkg/acquire-item.cc
apt-pkg/deb/debmetaindex.cc
apt-pkg/indexfile.cc
apt-pkg/indexfile.h
methods/copy.cc
test/integration/test-apt-acquire-additional-files
test/integration/test-compressed-indexes