summaryrefslogtreecommitdiff
path: root/apt-pkg/indexfile.h
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.h
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.h')
-rw-r--r--apt-pkg/indexfile.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/indexfile.h b/apt-pkg/indexfile.h
index 7eeccdbd3..44d39110d 100644
--- a/apt-pkg/indexfile.h
+++ b/apt-pkg/indexfile.h
@@ -60,6 +60,9 @@ class IndexTarget /*{{{*/
/** \brief Is it okay if the file isn't found in the meta index */
bool IsOptional;
+ /** \brief If the file is downloaded compressed, do not unpack it */
+ bool KeepCompressed;
+
/** \brief options with which this target was created
Prefer the usage of #Option if at all possible.
Beware: Not all of these options are intended for public use */
@@ -67,7 +70,7 @@ class 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);
+ bool const KeepCompressed, std::map<std::string, std::string> const &Options);
enum OptionKeys {
SITE,