]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
tests: fix some problems travis encounters
[apt.git] / cmdline / apt-get.cc
index 93c21651f6525186847ba964e486aa157f6cf8ae..8a30ac38d5e602ba3c857fab3c649f468627e997 100644 (file)
 #include <apti18n.h>
                                                                        /*}}}*/
 
-
 using namespace std;
 
-
-
 // TryToInstallBuildDep - Try to install a single package              /*{{{*/
 // ---------------------------------------------------------------------
 /* This used to be inlined in DoInstall, but with the advent of regex package
@@ -350,9 +347,6 @@ bool DoMarkAuto(CommandLine &CmdL)
 /* Intelligent upgrader that will install and remove packages at will */
 bool DoDistUpgrade(CommandLine &CmdL)
 {
-   if (CmdL.FileSize() != 1)
-      return _error->Error(_("The dist-upgrade command takes no arguments"));
-
    CacheFile Cache;
    if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false)
       return false;
@@ -365,6 +359,10 @@ bool DoDistUpgrade(CommandLine &CmdL)
       return false;
    }
    
+   // parse additional cmdline pkg manipulation switches
+   if(!DoCacheManipulationFromCommandLine(CmdL, Cache))
+      return false;
+
    c0out << _("Done") << endl;
    
    return InstallPackages(Cache,true);
@@ -1624,15 +1622,14 @@ void SigWinch(int)
 #endif
 }
                                                                        /*}}}*/
-
-bool DoUpgrade(CommandLine &CmdL)
+bool DoUpgrade(CommandLine &CmdL)                                      /*{{{*/
 {
    if (_config->FindB("APT::Get::UpgradeAllowNew", false) == true)
       return DoUpgradeWithAllowNewPackages(CmdL);
    else
       return DoUpgradeNoNewPackages(CmdL);
 }
-
+                                                                       /*}}}*/
 int main(int argc,const char *argv[])                                  /*{{{*/
 {
    CommandLine::Dispatch Cmds[] = {{"update",&DoUpdate},