]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt.cc
Provide "apt-get full-upgrade" to match "apt full-upgrade"
[apt.git] / cmdline / apt.cc
index 72086af14a97779c1fc3cded2036248e0f56519d..92db34cfa4fe389e021f68d331f0ff9518e0eafc 100644 (file)
@@ -39,8 +39,7 @@
 
 static bool ShowHelp(CommandLine &)
 {
 
 static bool ShowHelp(CommandLine &)
 {
-   ioprintf(c1out,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
-           COMMON_ARCH,__DATE__,__TIME__);
+   ioprintf(c1out, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
 
    // FIXME: generate from CommandLine
    c1out << 
 
    // FIXME: generate from CommandLine
    c1out << 
@@ -56,6 +55,7 @@ static bool ShowHelp(CommandLine &)
       "\n"
       " install - install packages\n"
       " remove  - remove packages\n"
       "\n"
       " install - install packages\n"
       " remove  - remove packages\n"
+      " autoremove - Remove automatically all unused packages\n"
       "\n"
       " upgrade - upgrade the system by installing/upgrading packages\n"
       " full-upgrade - upgrade the system by removing/installing/upgrading packages\n"
       "\n"
       " upgrade - upgrade the system by installing/upgrading packages\n"
       " full-upgrade - upgrade the system by removing/installing/upgrading packages\n"
@@ -77,6 +77,8 @@ int main(int argc, const char *argv[])                                        /*{{{*/
                                    // package stuff
                                    {"install",&DoInstall},
                                    {"remove", &DoInstall},
                                    // package stuff
                                    {"install",&DoInstall},
                                    {"remove", &DoInstall},
+                                   {"autoremove", &DoInstall},
+                                   {"auto-remove", &DoInstall},
                                    {"purge", &DoInstall},
 
                                    // system wide stuff
                                    {"purge", &DoInstall},
 
                                    // system wide stuff
@@ -116,17 +118,13 @@ int main(int argc, const char *argv[])                                    /*{{{*/
    _config->CndSet("DPkg::Progress-Fancy", "1");
    _config->CndSet("Apt::Color", "1");
    _config->CndSet("APT::Get::Upgrade-Allow-New", true);
    _config->CndSet("DPkg::Progress-Fancy", "1");
    _config->CndSet("Apt::Color", "1");
    _config->CndSet("APT::Get::Upgrade-Allow-New", true);
+   _config->CndSet("APT::Cmd::Show-Update-Stats", true);
 
    // Parse the command line and initialize the package library
 
    // 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
       _config->FindB("Apt::Cmd::Disable-Script-Warning", false) == false)
    {
       std::cerr << std::endl
@@ -137,15 +135,6 @@ int main(int argc, const char *argv[])                                     /*{{{*/
                 << 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);
 
    // see if we are in simulate mode
    CheckSimulateMode(CmdL);