debListParser *debian(dynamic_cast<debListParser *>(&List));
unsigned int Counter = 0;
+ step:
while (List.Step() == true)
{
// Get a pointer to the package structure
return false;
pkgCache::PkgIterator Pkg;
- if (NewPackage(Pkg,PackageName) == false)
- return _error->Error(_("Error occurred while processing %s (NewPackage)"),std::string(PackageName).c_str());
+ if (NewPackage(Pkg,PackageName) == false) {
+ _error->Warning(_("Error occurred while processing %s (NewPackage)"),std::string(PackageName).c_str());
+ goto step;
+ }
+
Counter++;
if (Counter % 100 == 0 && Progress != 0)
Progress->Progress(List.Offset());
// we first process the package, then the descriptions
// (this has the bonus that we get MMap error when we run out
// of MMap space)
- if (List.UsePackage(Pkg,pkgCache::VerIterator(Cache)) == false)
- return _error->Error(_("Error occurred while processing %s (UsePackage1)"),
+ if (List.UsePackage(Pkg,pkgCache::VerIterator(Cache)) == false) {
+ _error->Warning(_("Error occurred while processing %s (UsePackage1)"),
std::string(PackageName).c_str());
+ goto step;
+ }
// Find the right version to write the description
MD5SumValue CurMd5 = List.Description_md5();
*LastDesc = NewDescription(Desc, language, CurMd5, *LastDesc);
Desc->ParentPkg = Pkg.Index();
- if ((*LastDesc == 0 && _error->PendingError()) || NewFileDesc(Desc,List) == false)
- return _error->Error(_("Error occurred while processing %s (NewFileDesc1)"),std::string(PackageName).c_str());
+ if ((*LastDesc == 0 && _error->PendingError()) || NewFileDesc(Desc,List) == false) {
+ _error->Warning(_("Error occurred while processing %s (NewFileDesc1)"),std::string(PackageName).c_str());
+ goto step;
+ }
break;
}
}
unsigned long Hash = List.VersionHash();
if (Res == 0 && Ver->Hash == Hash)
{
- if (List.UsePackage(Pkg,Ver) == false)
- return _error->Error(_("Error occurred while processing %s (UsePackage2)"),
+ if (List.UsePackage(Pkg,Ver) == false) {
+ _error->Warning(_("Error occurred while processing %s (UsePackage2)"),
std::string(PackageName).c_str());
+ goto step;
+ }
- if (NewFileVer(Ver,List) == false)
- return _error->Error(_("Error occurred while processing %s (NewFileVer1)"),
+ if (NewFileVer(Ver,List) == false) {
+ _error->Warning(_("Error occurred while processing %s (NewFileVer1)"),
std::string(PackageName).c_str());
+ goto step;
+ }
// Read only a single record and return
if (OutVer != 0)
Ver->ParentPkg = Pkg.Index();
Ver->Hash = Hash;
- if ((*LastVer == 0 && _error->PendingError()) || List.NewVersion(Ver) == false)
- return _error->Error(_("Error occurred while processing %s (NewVersion1)"),
+ if ((*LastVer == 0 && _error->PendingError()) || List.NewVersion(Ver) == false) {
+ _error->Warning(_("Error occurred while processing %s (NewVersion1)"),
std::string(PackageName).c_str());
+ goto step;
+ }
- if (List.UsePackage(Pkg,Ver) == false)
- return _error->Error(_("Error occurred while processing %s (UsePackage3)"),
+ if (List.UsePackage(Pkg,Ver) == false) {
+ _error->Warning(_("Error occurred while processing %s (UsePackage3)"),
std::string(PackageName).c_str());
+ goto step;
+ }
- if (NewFileVer(Ver,List) == false)
- return _error->Error(_("Error occurred while processing %s (NewVersion2)"),
+ if (NewFileVer(Ver,List) == false) {
+ _error->Warning(_("Error occurred while processing %s (NewVersion2)"),
std::string(PackageName).c_str());
+ goto step;
+ }
// Read only a single record and return
if (OutVer != 0)
*LastDesc = NewDescription(Desc, language, List.Description_md5(), *LastDesc);
Desc->ParentPkg = Pkg.Index();
- if ((*LastDesc == 0 && _error->PendingError()) || NewFileDesc(Desc,List) == false)
- return _error->Error(_("Error occurred while processing %s (NewFileDesc2)"),std::string(PackageName).c_str());
+ if ((*LastDesc == 0 && _error->PendingError()) || NewFileDesc(Desc,List) == false) {
+ _error->Warning(_("Error occurred while processing %s (NewFileDesc2)"),std::string(PackageName).c_str());
+ goto step;
+ }
}
FoundFileDeps |= List.HasFileDeps();
if (Cache.HeaderP->PackageCount >= (1ULL<<sizeof(Cache.PkgP->ID)*8)-1)
return _error->Error(_("Wow, you exceeded the number of package "
"names this APT is capable of."));
- if (Cache.HeaderP->VersionCount >= (1ULL<<(sizeof(Cache.VerP->ID)*8))-1)
+ if (Cache.HeaderP->VersionCount >= (1ULL<<(sizeof(Cache.VerP->ID1)*8+sizeof(Cache.VerP->ID2)*8))-1)
return _error->Error(_("Wow, you exceeded the number of versions "
"this APT is capable of."));
if (Cache.HeaderP->DescriptionCount >= (1ULL<<(sizeof(Cache.DescP->ID)*8))-1)
// Fill it in
Ver = pkgCache::VerIterator(Cache,Cache.VerP + Version);
Ver->NextVer = Next;
- Ver->ID = Cache.HeaderP->VersionCount++;
+ unsigned int ID = Cache.HeaderP->VersionCount++;
+ Ver->ID1 = ID & 0xffff;
+ Ver->ID2 = ID >> 16;
Ver->VerStr = Map.WriteString(VerStr.Start, VerStr.Size);
if (Ver->VerStr == 0)
return 0;
MMap **OutMap,bool AllowMem)
{
bool const Debug = _config->FindB("Debug::pkgCacheGen", false);
- unsigned long const MapSize = _config->FindI("APT::Cache-Limit",24*1024*1024);
+ unsigned long const MapSize = _config->FindI("APT::Cache-Limit",128*1024*1024);
vector<pkgIndexFile *> Files;
for (vector<metaIndex *>::const_iterator i = List.begin();
/* */
bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap)
{
- unsigned long MapSize = _config->FindI("APT::Cache-Limit",20*1024*1024);
+ unsigned long MapSize = _config->FindI("APT::Cache-Limit",128*1024*1024);
vector<pkgIndexFile *> Files;
unsigned long EndOfSource = Files.size();
if (_system->AddStatusFiles(Files) == false)