Its not the fault of libdb, its the fault of commit 650faab01603caac04494d54cf6b10a65c00ea13
Here is the reason for the bug: --- apt-0.7.25.3ubuntu7/ftparchive/cachedb.h +++ apt-0.8.16~exp12ubuntu10/ftparchive/cachedb.h ... struct StatStore { uint32_t Flags; uint32_t mtime; - uint32_t FileSize; + uint64_t FileSize; uint8_t MD5[16]; uint8_t SHA1[20]; uint8_t SHA256[32]; + uint8_t SHA512[64]; } CurStat; ...
Adding the sha512 at the end is fine as there is a flag for the hashes so even if it reads garbage it will not use the not-yet-generated sha512 hash.
But the change of FileSize made it incompatibel.
Its not the fault of libdb, its the fault of commit 650faab01603caa c04494d54cf6b10 a65c00ea13
Here is the reason for the bug: 25.3ubuntu7/ ftparchive/ cachedb. h 16~exp12ubuntu1 0/ftparchive/ cachedb. h
--- apt-0.7.
+++ apt-0.8.
...
struct StatStore
{
uint32_t Flags;
uint32_t mtime;
- uint32_t FileSize;
+ uint64_t FileSize;
uint8_t MD5[16];
uint8_t SHA1[20];
uint8_t SHA256[32];
+ uint8_t SHA512[64];
} CurStat;
...
Adding the sha512 at the end is fine as there is a flag for the hashes so even if it reads garbage it will not use the not-yet-generated sha512 hash.
But the change of FileSize made it incompatibel.