summaryrefslogtreecommitdiff
path: root/apt-pkg/indexrecords.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-06-08 00:06:41 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-06-09 12:57:36 +0200
commit4f51fd8636592a96aecf17c8bf4cfdb3ea2207cc (patch)
tree0510ab4c8b6a78fe15798d5cac4455e4c0ae5178 /apt-pkg/indexrecords.cc
parentfec55559451dc1c440c4770ee3faa116522fc59c (diff)
support hashes for compressed pdiff files
At the moment we only have hashes for the uncompressed pdiff files, but via the new '$HASH-Download' field in the .diff/Index hashes can be provided for the .gz compressed pdiff file, which apt will pick up now and use to verify the download. Now, we "just" need a buy in from the creators of repositories…
Diffstat (limited to 'apt-pkg/indexrecords.cc')
-rw-r--r--apt-pkg/indexrecords.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc
index c26868cac..7e6da9558 100644
--- a/apt-pkg/indexrecords.cc
+++ b/apt-pkg/indexrecords.cc
@@ -121,9 +121,7 @@ bool indexRecords::Load(const string Filename) /*{{{*/
indexRecords::checkSum *Sum = new indexRecords::checkSum;
Sum->MetaKeyFilename = Name;
Sum->Size = Size;
- std::string SizeStr;
- strprintf(SizeStr, "%llu", Size);
- Sum->Hashes.push_back(HashString("Checksum-FileSize", SizeStr));
+ Sum->Hashes.FileSize(Size);
APT_IGNORE_DEPRECATED(Sum->Hash = HashString(HashString::SupportedHashes()[i],Hash);)
Entries[Name] = Sum;
}