X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/be8922fdc7521f4172e166b274430540be1913a8..36f610f18a9a12c02ba89c6bb84726f7ed3ba7ad:/apt-pkg/pkgcachegen.cc diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index bb678154c..d7e830df5 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcachegen.cc,v 1.31 1999/03/02 18:35:24 jgg Exp $ +// $Id: pkgcachegen.cc,v 1.34 1999/04/04 01:33:09 jgg Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -424,7 +424,10 @@ bool pkgSrcCacheCheck(pkgSourceList &List) { // Only cache deb source types. if (I->Type != pkgSourceList::Item::Deb) + { + Missing++; continue; + } string File = ListDir + URItoFileName(I->PackagesURI()); struct stat Buf; @@ -435,7 +438,7 @@ bool pkgSrcCacheCheck(pkgSourceList &List) Missing++; } } - + // Open the source package cache if (FileExists(CacheFile) == false) return false; @@ -466,12 +469,16 @@ bool pkgSrcCacheCheck(pkgSourceList &List) return false; for (pkgCache::PkgFileIterator F(Cache); F.end() == false; F++) - { + { // Search for a match in the source list bool Bad = true; for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); I++) { + // Only cache deb source types. + if (I->Type != pkgSourceList::Item::Deb) + continue; + string File = ListDir + URItoFileName(I->PackagesURI()); if (F.FileName() == File) { @@ -622,7 +629,7 @@ bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress) string CacheFile = _config->FindFile("Dir::Cache::pkgcache"); bool SrcOk = pkgSrcCacheCheck(List); bool PkgOk = SrcOk && pkgPkgCacheCheck(CacheFile); - + // Rebuild the source and package caches if (SrcOk == false) { @@ -654,6 +661,10 @@ bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress) unsigned long CurrentSize = 0; for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); I++) { + // Only cache deb source types. + if (I->Type != pkgSourceList::Item::Deb) + continue; + string File = ListDir + URItoFileName(I->PackagesURI()); if (FileExists(File) == false)