summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:36 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:36 +0000
commit803fafcbaa2fe4e1c49249e589d50f892b1b2424 (patch)
tree5daec4a662bddc88a2e5410ee7b8a7839495a2b4 /cmdline
parentb80d5b89446d8d4818a07690c395d1d20b82ba7f (diff)
Made apt-cache regenerate its cache in memory
Author: jgg Date: 1999-04-19 02:35:38 GMT Made apt-cache regenerate its cache in memory
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-cache.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 3f50f0c02..9a404e5be 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-cache.cc,v 1.33 1999/04/12 04:21:20 jgg Exp $
+// $Id: apt-cache.cc,v 1.34 1999/04/19 02:35:38 jgg Exp $
/* ######################################################################
apt-cache - Manages the cache files
@@ -658,15 +658,20 @@ int main(int argc,const char *argv[])
if (CmdL.DispatchArg(CmdsA,false) == false && _error->PendingError() == false)
{
// Open the cache file
- FileFd CacheF(_config->FindFile("Dir::Cache::pkgcache"),FileFd::ReadOnly);
- MMap Map(CacheF,MMap::Public | MMap::ReadOnly);
+ pkgSourceList List;
+ List.ReadMainList();
+
+ // Generate it and map it
+ OpProgress Prog;
+ MMap *Map = pkgMakeStatusCacheMem(List,Prog);
if (_error->PendingError() == false)
{
- pkgCache Cache(Map);
+ pkgCache Cache(*Map);
GCache = &Cache;
if (_error->PendingError() == false)
CmdL.DispatchArg(CmdsB);
- }
+ }
+ delete Map;
}
// Print any errors or warnings found during parsing