diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2023-08-01 13:59:09 +0200 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2023-08-02 12:04:32 +0200 |
| commit | 5576e7f76da73f3f5217f90d816cc19b6c0a5a77 (patch) | |
| tree | b5caa7891f49ae697bd1b8fb0db18f2d8a1a1831 /apt-pkg/pkgcachegen.h | |
| parent | 2a8830218bef1fa5fb01a387bddf7d76087eea58 (diff) | |
Compare SHA256 to check if versions are really the same
If we know both SHA256, and they're different, the packages are. This
approach stores the SHA256 only at runtime, avoiding the overhead of
storing it on-disk, because when we update repositories we update all
of them anyhow.
Note that pkgCacheGenerator is hidden, so we can just modify its
ABI, hooray.
Closes: #931175
LP: #2029268
Diffstat (limited to 'apt-pkg/pkgcachegen.h')
| -rw-r--r-- | apt-pkg/pkgcachegen.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index f4781d715..420642684 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -76,6 +76,12 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/ std::unordered_set<string_pointer, hash> strSections; #endif + struct VersionExtra + { + char SHA256[64]; + }; + std::vector<VersionExtra> VersionExtra{32 * 1024}; + friend class pkgCacheListParser; typedef pkgCacheListParser ListParser; |
