From 25c7a09d4a207bac875817559580f62c9ee07cb5 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 29 Dec 2015 15:11:11 +0100 Subject: Add support for calculating hashes over the entire cache --- apt-pkg/pkgcache.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apt-pkg/pkgcache.h') diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index e44fd544c..7acfc01ba 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -224,6 +224,8 @@ class pkgCache /*{{{*/ inline map_id_t Hash(const std::string &S) const {return sHash(S);} inline map_id_t Hash(const char *S) const {return sHash(S);} + APT_HIDDEN uint32_t CacheHash(); + // Useful transformation things static const char *Priority(unsigned char Priority); @@ -364,7 +366,7 @@ struct pkgCache::Header map_pointer_t * PkgHashTableP() const { return (map_pointer_t*) (this + 1); } map_pointer_t * GrpHashTableP() const { return PkgHashTableP() + GetHashTableSize(); } - /** \brief Size of the complete cache file */ + /** \brief Hash of the file (TODO: Rename) */ map_filesize_small_t CacheFileSize; bool CheckSizes(Header &Against) const APT_PURE; -- cgit v1.2.3