summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:54:49 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:54:49 +0000
commit4b1b89c5fe11c9977c55810cba26565e7ac66b36 (patch)
tree218c3497580f2f0365580c38863a637b8992fd9b /cmdline
parent2abbf30efbba4f652cfa47acc3e88ff9ed1f1889 (diff)
More or group patches
Author: jgg Date: 1999-10-02 04:14:53 GMT More or group patches
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-cache.cc31
1 files changed, 21 insertions, 10 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 12d306fc1..b825bd4f9 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.37 1999/07/15 03:15:49 jgg Exp $
+// $Id: apt-cache.cc,v 1.38 1999/10/02 04:14:54 jgg Exp $
/* ######################################################################
apt-cache - Manages the cache files
@@ -379,7 +379,7 @@ bool DumpAvail(CommandLine &Cmd)
return true;
}
/*}}}*/
-// Depends - Print out a dependency tree /*{{{*/
+// Depends - Print out a dependency tree /*{{{*/
// ---------------------------------------------------------------------
/* */
bool Depends(CommandLine &CmdL)
@@ -672,6 +672,7 @@ int main(int argc,const char *argv[])
{'q',"quiet","quiet",CommandLine::IntLevel},
{'i',"important","APT::Cache::Important",0},
{'f',"full","APT::Cache::ShowFull",0},
+ {'g',"no-generate","APT::Cache::NoGenerate",0},
{0,"names-only","APT::Cache::NamesOnly",0},
{'c',"config-file",0,CommandLine::ConfigFile},
{'o',"option",0,CommandLine::ArbItem},
@@ -712,14 +713,24 @@ int main(int argc,const char *argv[])
_config->Set("quiet","1");
if (CmdL.DispatchArg(CmdsA,false) == false && _error->PendingError() == false)
- {
- // Open the cache file
- pkgSourceList List;
- List.ReadMainList();
-
- // Generate it and map it
- OpProgress Prog;
- MMap *Map = pkgMakeStatusCacheMem(List,Prog);
+ {
+ MMap *Map;
+ if (_config->FindB("APT::Cache::NoGenerate",false) == true)
+ {
+ Map = new MMap(*new FileFd(_config->FindFile("Dir::Cache::pkgcache"),
+ FileFd::ReadOnly),MMap::Public|MMap::ReadOnly);
+ }
+ else
+ {
+ // Open the cache file
+ pkgSourceList List;
+ List.ReadMainList();
+
+ // Generate it and map it
+ OpProgress Prog;
+ Map = pkgMakeStatusCacheMem(List,Prog);
+ }
+
if (_error->PendingError() == false)
{
pkgCache Cache(*Map);