+// GenCaches - Call the main cache generator /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+bool GenCaches()
+{
+ OpTextProgress Progress(*_config);
+
+ pkgSourceList List;
+ List.ReadMainList();
+ return pkgMakeStatusCache(List,Progress);
+}
+ /*}}}*/
+// ShowHelp - Show a help screen /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+int ShowHelp()
+{
+ cout << PACKAGE << ' ' << VERSION << " for " << ARCHITECTURE <<
+ " compiled on " << __DATE__ << " " << __TIME__ << endl;
+
+ cout << "Usage: apt-cache [options] command" << endl;
+ cout << " apt-cache [options] add file1 [file1 ...]" << endl;
+ cout << " apt-cache [options] showpkg pkg1 [pkg2 ...]" << endl;
+ cout << endl;
+ cout << "apt-cache is a low-level tool used to manipulate APT's binary" << endl;
+ cout << "cache files stored in " << _config->FindFile("Dir::Cache") << endl;
+ cout << "It is not ment for ordinary use only as a debug aide." << endl;
+ cout << endl;
+ cout << "Commands:" << endl;
+ cout << " add - Add an package file to the source cache" << endl;
+ cout << " gencaches - Build both the package and source cache" << endl;
+ cout << " showpkg - Show some general information for a single package" << endl;
+ cout << " stats - Show some basic statistics" << endl;
+ cout << " dump - Show the entire file in a terse form" << endl;
+ cout << " dumpavail - Print an available file to stdout" << endl;
+ cout << " unmet - Show unmet dependencies" << endl;
+ cout << " check - Check the cache a bit" << endl;
+ cout << endl;
+ cout << "Options:" << endl;
+ cout << " -h This help text." << endl;
+ cout << " -p=? The package cache. [" << _config->FindFile("Dir::Cache::pkgcache") << ']' << endl;
+ cout << " -s=? The source cache. [" << _config->FindFile("Dir::Cache::srcpkgcache") << ']' << endl;
+ cout << " -q Disable progress indicator. " << endl;
+ cout << " -c=? Read this configuration file" << endl;
+ cout << " -o=? Set an arbitary configuration option, ie -o dir::cache=/tmp" << endl;
+ cout << "See the apt-cache(8) and apt.conf(8) manual pages for more information." << endl;
+ return 100;
+}
+ /*}}}*/
+// CacheInitialize - Initialize things for apt-cache /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+void CacheInitialize()
+{
+ _config->Set("quiet",0);
+ _config->Set("help",false);
+}
+ /*}}}*/