|
@@ -81,7 +81,8 @@ bool ShowHelp(CommandLine &CmdL)
|
|
|
" install - install packages\n"
|
|
" install - install packages\n"
|
|
|
" remove - remove packages\n"
|
|
" remove - remove packages\n"
|
|
|
"\n"
|
|
"\n"
|
|
|
- " upgrade - upgrade the systems packages\n"
|
|
|
|
|
|
|
+ " upgrade - upgrade the system by installing/upgrading packages\n"
|
|
|
|
|
+ "full-upgrade - upgrade the system by removing/installing/upgrading packages\n"
|
|
|
"\n"
|
|
"\n"
|
|
|
" edit-sources - edit the source information file\n"
|
|
" edit-sources - edit the source information file\n"
|
|
|
);
|
|
);
|
|
@@ -89,29 +90,29 @@ bool ShowHelp(CommandLine &CmdL)
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// figure out what kind of upgrade the user wants
|
|
|
|
|
-bool DoAptUpgrade(CommandLine &CmdL)
|
|
|
|
|
-{
|
|
|
|
|
- if (_config->FindB("Apt::Cmd::Dist-Upgrade"))
|
|
|
|
|
- return DoDistUpgrade(CmdL);
|
|
|
|
|
- else
|
|
|
|
|
- return DoUpgradeWithAllowNewPackages(CmdL);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
int main(int argc, const char *argv[]) /*{{{*/
|
|
int main(int argc, const char *argv[]) /*{{{*/
|
|
|
{
|
|
{
|
|
|
- CommandLine::Dispatch Cmds[] = {{"list",&List},
|
|
|
|
|
|
|
+ CommandLine::Dispatch Cmds[] = {
|
|
|
|
|
+ // query
|
|
|
|
|
+ {"list",&List},
|
|
|
{"search", &FullTextSearch},
|
|
{"search", &FullTextSearch},
|
|
|
{"show", &APT::Cmd::ShowPackage},
|
|
{"show", &APT::Cmd::ShowPackage},
|
|
|
|
|
+
|
|
|
// package stuff
|
|
// package stuff
|
|
|
{"install",&DoInstall},
|
|
{"install",&DoInstall},
|
|
|
{"remove", &DoInstall},
|
|
{"remove", &DoInstall},
|
|
|
{"purge", &DoInstall},
|
|
{"purge", &DoInstall},
|
|
|
|
|
+
|
|
|
// system wide stuff
|
|
// system wide stuff
|
|
|
{"update",&DoUpdate},
|
|
{"update",&DoUpdate},
|
|
|
- {"upgrade",&DoAptUpgrade},
|
|
|
|
|
|
|
+ {"upgrade",&DoUpgrade},
|
|
|
|
|
+ {"full-upgrade",&DoDistUpgrade},
|
|
|
|
|
+ // for compat with muscle memory
|
|
|
|
|
+ {"dist-upgrade",&DoDistUpgrade},
|
|
|
|
|
+
|
|
|
// misc
|
|
// misc
|
|
|
{"edit-sources",&EditSources},
|
|
{"edit-sources",&EditSources},
|
|
|
|
|
+
|
|
|
// helper
|
|
// helper
|
|
|
{"moo",&DoMoo},
|
|
{"moo",&DoMoo},
|
|
|
{"help",&ShowHelp},
|
|
{"help",&ShowHelp},
|
|
@@ -131,9 +132,10 @@ int main(int argc, const char *argv[]) /*{{{*/
|
|
|
return 100;
|
|
return 100;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // FIXME: move into a new libprivate/private-install.cc:Install()
|
|
|
|
|
- _config->Set("DPkgPM::Progress", "1");
|
|
|
|
|
- _config->Set("Apt::Color", "1");
|
|
|
|
|
|
|
+ // some different defaults
|
|
|
|
|
+ _config->CndSet("DPkgPM::Progress", "1");
|
|
|
|
|
+ _config->CndSet("Apt::Color", "1");
|
|
|
|
|
+ _config->CndSet("APT::Get::Upgrade-Allow-New", true);
|
|
|
|
|
|
|
|
// Parse the command line and initialize the package library
|
|
// Parse the command line and initialize the package library
|
|
|
CommandLine CmdL(Args.data(), _config);
|
|
CommandLine CmdL(Args.data(), _config);
|