- 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},
- {'i',"important","APT::Cache::Important",0},
- {'f',"full","APT::Cache::ShowFull",0},
- {'g',"no-generate","APT::Cache::NoGenerate",0},
- {0,"names-only","APT::Cache::NamesOnly",0},
- {'c',"config-file",0,CommandLine::ConfigFile},
- {'o',"option",0,CommandLine::ArbItem},
- {0,0,0,0}};
- CommandLine::Dispatch CmdsA[] = {{"help",&ShowHelp},
- {"add",&DoAdd},
- {"gencaches",&GenCaches},
- {"showsrc",&ShowSrcPackage},
- {0,0}};
- CommandLine::Dispatch CmdsB[] = {{"showpkg",&DumpPackage},
- {"stats",&Stats},
- {"dump",&Dump},
- {"dumpavail",&DumpAvail},
- {"unmet",&UnMet},
- {"check",&Check},
- {"search",&Search},
- {"depends",&Depends},
- {"show",&ShowPackage},
- {0,0}};
-
- CacheInitialize();
-
- // Parse the command line and initialize the package library
- CommandLine CmdL(Args,_config);
- if (pkgInitialize(*_config) == false ||
- CmdL.Parse(argc,argv) == false)
- {
- _error->DumpErrors();
- return 100;
- }