summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc8
-rw-r--r--cmdline/apt-mark.cc5
-rw-r--r--cmdline/apt.cc32
3 files changed, 22 insertions, 23 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 8a0772ce2..da7d28a1e 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1679,14 +1679,6 @@ void SigWinch(int)
#endif
}
/*}}}*/
-bool DoUpgrade(CommandLine &CmdL) /*{{{*/
-{
- if (_config->FindB("APT::Get::Upgrade-Allow-New", false) == true)
- return DoUpgradeWithAllowNewPackages(CmdL);
- else
- return DoUpgradeNoNewPackages(CmdL);
-}
- /*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
CommandLine::Dispatch Cmds[] = {{"update",&DoUpdate},
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc
index ebb1f9892..d3a3a780b 100644
--- a/cmdline/apt-mark.cc
+++ b/cmdline/apt-mark.cc
@@ -386,6 +386,11 @@ bool ShowHelp(CommandLine &CmdL)
"Commands:\n"
" auto - Mark the given packages as automatically installed\n"
" manual - Mark the given packages as manually installed\n"
+ " hold - Mark a package as held back\n"
+ " unhold - Unset a package set as held back\n"
+ " showauto - Print the list of automatically installed packages\n"
+ " showmanual - Print the list of manually installed packages\n"
+ " showhold - Print the list of package on hold\n"
"\n"
"Options:\n"
" -h This help text.\n"
diff --git a/cmdline/apt.cc b/cmdline/apt.cc
index 07ade6b7c..6fe25e3f3 100644
--- a/cmdline/apt.cc
+++ b/cmdline/apt.cc
@@ -81,7 +81,8 @@ bool ShowHelp(CommandLine &CmdL)
" install - install packages\n"
" remove - remove packages\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"
" edit-sources - edit the source information file\n"
);
@@ -89,29 +90,29 @@ bool ShowHelp(CommandLine &CmdL)
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[]) /*{{{*/
{
- CommandLine::Dispatch Cmds[] = {{"list",&List},
+ CommandLine::Dispatch Cmds[] = {
+ // query
+ {"list",&List},
{"search", &FullTextSearch},
{"show", &APT::Cmd::ShowPackage},
+
// package stuff
{"install",&DoInstall},
{"remove", &DoInstall},
{"purge", &DoInstall},
+
// system wide stuff
{"update",&DoUpdate},
- {"upgrade",&DoAptUpgrade},
+ {"upgrade",&DoUpgrade},
+ {"full-upgrade",&DoDistUpgrade},
+ // for compat with muscle memory
+ {"dist-upgrade",&DoDistUpgrade},
+
// misc
{"edit-sources",&EditSources},
+
// helper
{"moo",&DoMoo},
{"help",&ShowHelp},
@@ -131,9 +132,10 @@ int main(int argc, const char *argv[]) /*{{{*/
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
CommandLine CmdL(Args.data(), _config);