From 2e5f4e45f593535e2c88181ff7a9e2d32a5e60f9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 4 Jun 2010 14:43:03 +0200 Subject: * apt-pkg/cachefile.{cc,h}: - split Open() into submethods to be able to build only parts - make the OpProgress optional in the Cache buildprocess --- apt-pkg/pkgcachegen.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'apt-pkg/pkgcachegen.h') diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index 46d0cd893..ff0941e0c 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -76,7 +76,11 @@ class pkgCacheGenerator /*{{{*/ bool HasFileDeps() {return FoundFileDeps;}; bool MergeFileProvides(ListParser &List); - bool FinishCache(OpProgress &Progress); + bool FinishCache(OpProgress *Progress); + + static bool MakeStatusCache(pkgSourceList &List,OpProgress *Progress, + MMap **OutMap = 0,bool AllowMem = false); + static bool MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap); pkgCacheGenerator(DynamicMMap *Map,OpProgress *Progress); ~pkgCacheGenerator(); @@ -134,10 +138,12 @@ class pkgCacheGenerator::ListParser virtual ~ListParser() {}; }; /*}}}*/ + bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress, MMap **OutMap = 0,bool AllowMem = false); bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap); + #ifdef APT_COMPATIBILITY #if APT_COMPATIBILITY != 986 #warning "Using APT_COMPATIBILITY" @@ -145,7 +151,7 @@ bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap); MMap *pkgMakeStatusCacheMem(pkgSourceList &List,OpProgress &Progress) { MMap *Map = 0; - if (pkgMakeStatusCache(List,Progress,&Map,true) == false) + if (pkgCacheGenerator::MakeStatusCache(List,&Progress,&Map,true) == false) return 0; return Map; } -- cgit v1.2.3