// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-cache.cc,v 1.21 1998/12/31 01:32:20 jgg Exp $
+// $Id: apt-cache.cc,v 1.24 1999/02/08 07:54:58 jgg Exp $
/* ######################################################################
apt-cache - Manages the cache files
#include <apt-pkg/progress.h>
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/cmndline.h>
-#include <strutl.h>
+#include <apt-pkg/strutl.h>
+#include <config.h>
#include <iostream.h>
-#include <config.h>
+#include <errno.h>
/*}}}*/
pkgCache *GCache = 0;
{
cout << PACKAGE << ' ' << VERSION << " for " << ARCHITECTURE <<
" compiled on " << __DATE__ << " " << __TIME__ << endl;
+ if (_config->FindB("version") == true)
+ return 100;
cout << "Usage: apt-cache [options] command" << endl;
cout << " apt-cache [options] add file1 [file1 ...]" << endl;
{
CommandLine::Args Args[] = {
{'h',"help","help",0},
+ {'v',"version","version",0},
{'p',"pkg-cache","Dir::Cache::pkgcache",CommandLine::HasArg},
{'s',"src-cache","Dir::Cache::srcpkgcache",CommandLine::HasArg},
{'q',"quiet","quiet",CommandLine::IntLevel},