// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.cc,v 1.20 1998/12/07 07:26:19 jgg Exp $
+// $Id: pkgcache.cc,v 1.21 1998/12/14 03:39:15 jgg Exp $
/* ######################################################################
Package Cache - Accessor code for the cache
VersionCount = 0;
DependsCount = 0;
PackageFileCount = 0;
+ VerFileCount = 0;
+ ProvidesCount = 0;
MaxVerFileSize = 0;
FileList = 0;
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.h,v 1.13 1998/12/14 02:23:46 jgg Exp $
+// $Id: pkgcache.h,v 1.14 1998/12/14 03:39:15 jgg Exp $
/* ######################################################################
Cache - Structure definitions for the cache file
unsigned long VersionCount;
unsigned long DependsCount;
unsigned long PackageFileCount;
+ unsigned long VerFileCount;
+ unsigned long ProvidesCount;
// Offsets
__apt_ptrloc FileList; // struct PackageFile
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcachegen.cc,v 1.25 1998/12/14 02:23:47 jgg Exp $
+// $Id: pkgcachegen.cc,v 1.26 1998/12/14 03:39:15 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
VF->Size = List.Size();
if (Cache.HeaderP->MaxVerFileSize < VF->Size)
Cache.HeaderP->MaxVerFileSize = VF->Size;
+ Cache.HeaderP->VerFileCount++;
+
return true;
}
/*}}}*/
unsigned long Provides = Owner->Map.Allocate(sizeof(pkgCache::Provides));
if (Provides == 0)
return false;
+ Cache.HeaderP->ProvidesCount++;
// Fill it in
pkgCache::PrvIterator Prv(Cache,Cache.ProvideP + Provides,Cache.PkgP);
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-cache.cc,v 1.19 1998/12/14 02:23:47 jgg Exp $
+// $Id: apt-cache.cc,v 1.20 1998/12/14 03:39:15 jgg Exp $
/* ######################################################################
apt-cache - Manages the cache files
cout << "Total Dependencies: " << Cache.Head().DependsCount << " (" <<
SizeToStr(Cache.Head().DependsCount*Cache.Head().DependencySz) << ')' << endl;
- cout << "Total Ver/File relations: " << Cache.Head().PackageCount << " (" <<
- SizeToStr(Cache.Head().PackageCount*Cache.Head().PackageSz) << ')' << endl;
+ cout << "Total Ver/File relations: " << Cache.Head().VerFileCount << " (" <<
+ SizeToStr(Cache.Head().VerFileCount*Cache.Head().VerFileSz) << ')' << endl;
+ cout << "Total Provides Mappings: " << Cache.Head().ProvidesCount << " (" <<
+ SizeToStr(Cache.Head().ProvidesCount*Cache.Head().ProvidesSz) << ')' << endl;
// String list stats
unsigned long Size = 0;
unsigned long Total = 0;
Total = Slack + Size + Cache.Head().DependsCount*Cache.Head().DependencySz +
Cache.Head().VersionCount*Cache.Head().VersionSz +
- Cache.Head().PackageCount*Cache.Head().PackageSz;
+ Cache.Head().PackageCount*Cache.Head().PackageSz +
+ Cache.Head().VerFileCount*Cache.Head().VerFileSz +
+ Cache.Head().ProvidesCount*Cache.Head().ProvidesSz;
cout << "Total Space Accounted for: " << SizeToStr(Total) << endl;
return true;