_config->CndSet("APT::Cmd::Show-Update-Stats", true);
// Parse the command line and initialize the package library
- CommandLine CmdL(Args.data(), _config);
- if (CmdL.Parse(argc, argv) == false ||
- pkgInitSystem(*_config, _system) == false)
- {
- _error->DumpErrors();
- return 100;
- }
+ CommandLine CmdL;
+ ParseCommandLine(CmdL, Cmds, Args.data(), NULL, &_system, argc, argv, ShowHelp);
- if(!isatty(STDOUT_FILENO) &&
+ if(!isatty(STDOUT_FILENO) &&
_config->FindB("Apt::Cmd::Disable-Script-Warning", false) == false)
{
std::cerr << std::endl
<< std::endl;
}
- // See if the help should be shown
- if (_config->FindB("help") == true ||
- _config->FindB("version") == true ||
- CmdL.FileSize() == 0)
- {
- ShowHelp(CmdL);
- return 0;
- }
-
// see if we are in simulate mode
CheckSimulateMode(CmdL);