From ce3794a7df13f3d7387b4e4520221421ee92127b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 30 Jan 2025 23:39:50 +0000 Subject: Include Extra in the size counted for Version struct It is a tiny struct, so the difference in 'stats' is minor even with all the versions but it is more correct and also helps in case the Extra struct is changed to predictably trigger a binary cache invalidation. --- apt-pkg/pkgcache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 16df1704e..bccd7798f 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -67,7 +67,7 @@ pkgCache::Header::Header() APT_HEADER_SET(PackageSz, sizeof(pkgCache::Package)); APT_HEADER_SET(ReleaseFileSz, sizeof(pkgCache::ReleaseFile)); APT_HEADER_SET(PackageFileSz, sizeof(pkgCache::PackageFile)); - APT_HEADER_SET(VersionSz, sizeof(pkgCache::Version)); + APT_HEADER_SET(VersionSz, sizeof(pkgCache::Version) + sizeof(pkgCache::Version::Extra)); APT_HEADER_SET(DescriptionSz, sizeof(pkgCache::Description)); APT_HEADER_SET(DependencySz, sizeof(pkgCache::Dependency)); APT_HEADER_SET(DependencyDataSz, sizeof(pkgCache::DependencyData)); -- cgit v1.2.3-70-g09d2