// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcachegen.cc,v 1.52 2002/07/08 03:13:30 jgg Exp $
+// $Id: pkgcachegen.cc,v 1.53.2.1 2003/12/24 23:09:17 mdz Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
}
unsigned long Size = (*I)->Size();
- Progress.OverallProgress(CurrentSize,TotalSize,Size,_("Reading Package Lists"));
+ Progress.OverallProgress(CurrentSize,TotalSize,Size,_("Reading package lists"));
CurrentSize += Size;
if ((*I)->Merge(Gen,Progress) == false)
bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress,
MMap **OutMap,bool AllowMem)
{
- unsigned long MapSize = _config->FindI("APT::Cache-Limit",6*1024*1024);
+ unsigned long MapSize = _config->FindI("APT::Cache-Limit",12*1024*1024);
+
+ vector<pkgIndexFile *> Files;
+ for (vector<metaIndex *>::const_iterator i = List.begin();
+ i != List.end();
+ i++)
+ {
+ vector <pkgIndexFile *> *Indexes = (*i)->GetIndexFiles();
+ for (vector<pkgIndexFile *>::const_iterator j = Indexes->begin();
+ j != Indexes->end();
+ j++)
+ Files.push_back (*j);
+ }
- vector<pkgIndexFile *> Files(List.begin(),List.end());
unsigned long EndOfSource = Files.size();
if (_system->AddStatusFiles(Files) == false)
return false;
if (Writeable == false && AllowMem == false && CacheFile.empty() == false)
return _error->Error(_("Unable to write to %s"),flNotFile(CacheFile).c_str());
- Progress.OverallProgress(0,1,1,_("Reading Package Lists"));
+ Progress.OverallProgress(0,1,1,_("Reading package lists"));
// Cache is OK, Fin.
if (CheckValidity(CacheFile,Files.begin(),Files.end(),OutMap) == true)
{
- Progress.OverallProgress(1,1,1,_("Reading Package Lists"));
+ Progress.OverallProgress(1,1,1,_("Reading package lists"));
return true;
}
/* */
bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap)
{
- unsigned long MapSize = _config->FindI("APT::Cache-Limit",4*1024*1024);
+ unsigned long MapSize = _config->FindI("APT::Cache-Limit",8*1024*1024);
vector<pkgIndexFile *> Files;
unsigned long EndOfSource = Files.size();
if (_system->AddStatusFiles(Files) == false)
TotalSize = ComputeSize(Files.begin()+EndOfSource,Files.end());
// Build the status cache
- Progress.OverallProgress(0,1,1,_("Reading Package Lists"));
+ Progress.OverallProgress(0,1,1,_("Reading package lists"));
pkgCacheGenerator Gen(Map.Get(),&Progress);
if (_error->PendingError() == true)
return false;