diff options
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-cache.cc | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 97211a57a..4d0a076a8 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.5 1998/07/21 05:33:21 jgg Exp $ +// $Id: apt-cache.cc,v 1.6 1998/07/26 23:11:56 jgg Exp $ /* ###################################################################### apt-cache - Manages the cache file. @@ -29,6 +29,7 @@ #include <apt-pkg/deblistparser.h> #include <apt-pkg/init.h> #include <apt-pkg/progress.h> +#include <apt-pkg/sourcelist.h> #include <iostream.h> #include <fstream.h> @@ -299,6 +300,17 @@ bool DoAdd(int argc,char *argv[]) return true; } /*}}}*/ +// GenCaches - Call the main cache generator /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool GenCaches() +{ + OpTextProgress Progress; + pkgSourceList List; + List.ReadMainList(); + return pkgMakeStatusCache(List,Progress); +} + /*}}}*/ int main(int argc, char *argv[]) { @@ -319,6 +331,12 @@ int main(int argc, char *argv[]) break; } + if (strcmp(argv[1],"gencaches") == 0) + { + GenCaches(); + break; + } + // Open the cache file FileFd CacheF(CacheFile,FileFd::ReadOnly); if (_error->PendingError() == true) @@ -356,7 +374,7 @@ int main(int argc, char *argv[]) DumpAvail(Cache); break; } - + _error->Error("Invalid operation %s", argv[1]); break; } |