summaryrefslogtreecommitdiff
path: root/apt-pkg/indexfile.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-06-30 10:53:51 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-08-10 17:25:26 +0200
commit653ef26c70dc9c0e2cbfdd4e79117876bb63e87d (patch)
treed9fbea48e857abca5e1e91751b9ec7174364cf20 /apt-pkg/indexfile.cc
parent525bcd780d0284d980db805c62254e7d27507345 (diff)
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.
Diffstat (limited to 'apt-pkg/indexfile.cc')
-rw-r--r--apt-pkg/indexfile.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc
index e9e1b08c3..cce17403d 100644
--- a/apt-pkg/indexfile.cc
+++ b/apt-pkg/indexfile.cc
@@ -115,8 +115,9 @@ APT_DEPRECATED std::string pkgIndexFile::LanguageCode() {
// IndexTarget - Constructor /*{{{*/
IndexTarget::IndexTarget(std::string const &MetaKey, std::string const &ShortDesc,
std::string const &LongDesc, std::string const &URI, bool const IsOptional,
- std::map<std::string, std::string> const &Options) :
- URI(URI), Description(LongDesc), ShortDesc(ShortDesc), MetaKey(MetaKey), IsOptional(IsOptional), Options(Options)
+ bool const KeepCompressed, std::map<std::string, std::string> const &Options) :
+ URI(URI), Description(LongDesc), ShortDesc(ShortDesc), MetaKey(MetaKey),
+ IsOptional(IsOptional), KeepCompressed(KeepCompressed), Options(Options)
{
}
/*}}}*/