diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:50:54 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:50:54 +0000 |
commit | 880e9be46811db19b9346f30ba0ea22f63db59c4 (patch) | |
tree | c1d76cb3617cf425a2cc9eac86b224e1e1312115 /cmdline/apt-cache.cc | |
parent | 6f4f200a22304be5352872d6e511f178434ce335 (diff) |
Brought in the GUI
Author: jgg
Date: 1998-07-26 23:11:52 GMT
Brought in the GUI
Diffstat (limited to 'cmdline/apt-cache.cc')
-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; } |