// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcachegen.cc,v 1.20 1998/10/20 02:39:21 jgg Exp $
+// $Id: pkgcachegen.cc,v 1.23 1998/11/13 04:23:33 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
}
pkgCache::VerIterator Ver = Pkg.VersionList();
- unsigned long *Last = &Pkg->VersionList;
+ __apt_ptrloc *Last = &Pkg->VersionList;
int Res = 1;
for (; Ver.end() == false; Last = &Ver->NextVer, Ver++)
{
pkgCache::VerFileIterator VF(Cache,Cache.VerFileP + VerFile);
VF->File = CurrentFile - Cache.PkgFileP;
- VF->NextFile = Ver->FileList;
- Ver->FileList = VF.Index();
+
+ // Link it to the end of the list
+ __apt_ptrloc *Last = &Ver->FileList;
+ for (pkgCache::VerFileIterator V = Ver.FileList(); V.end() == false; V++)
+ Last = &V->NextFile;
+ VF->NextFile = *Last;
+ *Last = VF.Index();
+
VF->Offset = List.Offset();
VF->Size = List.Size();
if (Cache.HeaderP->MaxVerFileSize < VF->Size)
Pkg->RevDepends = Dep.Index();
// Link it to the version (at the end of the list)
- unsigned long *Last = &Ver->DependsList;
+ __apt_ptrloc *Last = &Ver->DependsList;
for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++)
Last = &D->NextDepends;
Dep->NextDepends = *Last;
// Search for an insertion point
pkgCache::StringItem *I = Cache.StringItemP + Cache.HeaderP->StringList;
int Res = 1;
- unsigned long *Last = &Cache.HeaderP->StringList;
+ __apt_ptrloc *Last = &Cache.HeaderP->StringList;
for (; I != Cache.StringItemP; Last = &I->NextItem,
I = Cache.StringItemP + I->NextItem)
{
return false;
string CacheFile = _config->FindFile("Dir::Cache::srcpkgcache");
- string ListDir = _config->FindFile("Dir::State::lists");
+ string ListDir = _config->FindDir("Dir::State::lists");
// Count the number of missing files
int Missing = 0;
if (SrcOk == false)
{
string SCacheFile = _config->FindFile("Dir::Cache::srcpkgcache");
- string ListDir = _config->FindFile("Dir::State::lists");
-
+ string ListDir = _config->FindDir("Dir::State::lists");
FileFd SCacheF(SCacheFile,FileFd::WriteEmpty);
FileFd CacheF(CacheFile,FileFd::WriteEmpty);
DynamicMMap Map(CacheF,MMap::Public);