unsigned long Hash = List.VersionHash();
pkgCache::VerIterator Ver = Pkg.VersionList();
Dynamic<pkgCache::VerIterator> DynVer(Ver);
unsigned long Hash = List.VersionHash();
pkgCache::VerIterator Ver = Pkg.VersionList();
Dynamic<pkgCache::VerIterator> DynVer(Ver);
// Create Conflicts in between the group
pkgCache::GrpIterator G = GetCache().GrpBegin();
Dynamic<pkgCache::GrpIterator> DynG(G);
// Create Conflicts in between the group
pkgCache::GrpIterator G = GetCache().GrpBegin();
Dynamic<pkgCache::GrpIterator> DynG(G);
Dynamic<pkgCache::PkgIterator> DynallPkg(allPkg);
pkgCache::VerIterator V = P.VersionList();
Dynamic<pkgCache::VerIterator> DynV(V);
Dynamic<pkgCache::PkgIterator> DynallPkg(allPkg);
pkgCache::VerIterator V = P.VersionList();
Dynamic<pkgCache::VerIterator> DynV(V);
map_ptrloc *OldDepLast = NULL;
/* MultiArch handling introduces a lot of implicit Dependencies:
- MultiArch: same → Co-Installable if they have the same version
map_ptrloc *OldDepLast = NULL;
/* MultiArch handling introduces a lot of implicit Dependencies:
- MultiArch: same → Co-Installable if they have the same version
OldDepLast = &D->NextDepends;
} else if (oldMap != Map.Data())
OldDepLast += (map_ptrloc*) Map.Data() - (map_ptrloc*) oldMap;
OldDepLast = &D->NextDepends;
} else if (oldMap != Map.Data())
OldDepLast += (map_ptrloc*) Map.Data() - (map_ptrloc*) oldMap;
/* This just verifies that each file in the list of index files exists,
has matching attributes with the cache and the cache does not have
any extra files. */
/* This just verifies that each file in the list of index files exists,
has matching attributes with the cache and the cache does not have
any extra files. */
-static bool CheckValidity(const string &CacheFile, FileIterator Start,
- FileIterator End,MMap **OutMap = 0)
+static bool CheckValidity(const string &CacheFile,
+ pkgSourceList &List,
+ FileIterator Start,
+ FileIterator End,
+ MMap **OutMap = 0)
{
bool const Debug = _config->FindB("Debug::pkgCacheGen", false);
// No file, certainly invalid
{
bool const Debug = _config->FindB("Debug::pkgCacheGen", false);
// No file, certainly invalid
// Map it
FileFd CacheF(CacheFile,FileFd::ReadOnly);
SPtr<MMap> Map = new MMap(CacheF,0);
// Map it
FileFd CacheF(CacheFile,FileFd::ReadOnly);
SPtr<MMap> Map = new MMap(CacheF,0);
verify the IMS data and check that it is on the disk too.. */
SPtrArray<bool> Visited = new bool[Cache.HeaderP->PackageFileCount];
memset(Visited,0,sizeof(*Visited)*Cache.HeaderP->PackageFileCount);
verify the IMS data and check that it is on the disk too.. */
SPtrArray<bool> Visited = new bool[Cache.HeaderP->PackageFileCount];
memset(Visited,0,sizeof(*Visited)*Cache.HeaderP->PackageFileCount);
static unsigned long ComputeSize(FileIterator Start,FileIterator End)
{
unsigned long TotalSize = 0;
static unsigned long ComputeSize(FileIterator Start,FileIterator End)
{
unsigned long TotalSize = 0;
{
vector <pkgIndexFile *> *Indexes = (*i)->GetIndexFiles();
for (vector<pkgIndexFile *>::const_iterator j = Indexes->begin();
j != Indexes->end();
{
vector <pkgIndexFile *> *Indexes = (*i)->GetIndexFiles();
for (vector<pkgIndexFile *>::const_iterator j = Indexes->begin();
j != Indexes->end();
Progress->OverallProgress(0,1,1,_("Reading package lists"));
// Cache is OK, Fin.
Progress->OverallProgress(0,1,1,_("Reading package lists"));
// Cache is OK, Fin.
- if (CheckValidity(CacheFile,Files.begin(),Files.end(),OutMap) == true)
+ if (CheckValidity(CacheFile, List, Files.begin(),Files.end(),OutMap) == true)
{
if (Progress != NULL)
Progress->OverallProgress(1,1,1,_("Reading package lists"));
{
if (Progress != NULL)
Progress->OverallProgress(1,1,1,_("Reading package lists"));
// Lets try the source cache.
unsigned long CurrentSize = 0;
unsigned long TotalSize = 0;
// Lets try the source cache.
unsigned long CurrentSize = 0;
unsigned long TotalSize = 0;
- if (CheckValidity(SrcCacheFile,Files.begin(),
+ if (CheckValidity(SrcCacheFile, List, Files.begin(),