X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b0b4efb96c3fad90bf978d61b230501bcdadff3d..65a1e968442361247b646dc61843f841235114e0:/cmdline/apt-cache.cc diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index b4bb3a818..cf1240bc6 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.19 1998/12/14 02:23:47 jgg Exp $ +// $Id: apt-cache.cc,v 1.23 1999/01/30 02:12:53 jgg Exp $ /* ###################################################################### apt-cache - Manages the cache files @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -237,8 +237,10 @@ bool Stats(CommandLine &Cmd) cout << "Total Dependencies: " << Cache.Head().DependsCount << " (" << SizeToStr(Cache.Head().DependsCount*Cache.Head().DependencySz) << ')' << endl; - cout << "Total Ver/File relations: " << Cache.Head().PackageCount << " (" << - SizeToStr(Cache.Head().PackageCount*Cache.Head().PackageSz) << ')' << endl; + cout << "Total Ver/File relations: " << Cache.Head().VerFileCount << " (" << + SizeToStr(Cache.Head().VerFileCount*Cache.Head().VerFileSz) << ')' << endl; + cout << "Total Provides Mappings: " << Cache.Head().ProvidesCount << " (" << + SizeToStr(Cache.Head().ProvidesCount*Cache.Head().ProvidesSz) << ')' << endl; // String list stats unsigned long Size = 0; @@ -259,7 +261,9 @@ bool Stats(CommandLine &Cmd) unsigned long Total = 0; Total = Slack + Size + Cache.Head().DependsCount*Cache.Head().DependencySz + Cache.Head().VersionCount*Cache.Head().VersionSz + - Cache.Head().PackageCount*Cache.Head().PackageSz; + Cache.Head().PackageCount*Cache.Head().PackageSz + + Cache.Head().VerFileCount*Cache.Head().VerFileSz + + Cache.Head().ProvidesCount*Cache.Head().ProvidesSz; cout << "Total Space Accounted for: " << SizeToStr(Total) << endl; return true; @@ -443,6 +447,8 @@ bool ShowHelp(CommandLine &Cmd) { 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; @@ -470,7 +476,7 @@ bool ShowHelp(CommandLine &Cmd) cout << " -i Show only important deps for the unmet command." << 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; + cout << "See the apt-cache(8) and apt.conf(5) manual pages for more information." << endl; return 100; } /*}}}*/ @@ -488,6 +494,7 @@ int main(int argc,const char *argv[]) { 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},