]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
truncating /dev/null to zero is always successful
[apt.git] / cmdline / apt-get.cc
index e5e22e16635a7e31260acb0dca0f68740912cfe9..912b2d6099f2a434bc0ffcecc23efdf41aeb6d51 100644 (file)
@@ -49,6 +49,7 @@
 #include <apt-pkg/pkgsystem.h>
 #include <apt-pkg/pkgrecords.h>
 #include <apt-pkg/indexfile.h>
+#include <apt-pkg/upgrade.h>
 
 #include <apt-private/private-download.h>
 #include <apt-private/private-install.h>
@@ -58,6 +59,7 @@
 #include <apt-private/private-update.h>
 #include <apt-private/private-cmndline.h>
 #include <apt-private/private-moo.h>
+#include <apt-private/private-utils.h>
 
 #include <apt-private/acqprogress.h>
 
@@ -343,32 +345,6 @@ bool DoMarkAuto(CommandLine &CmdL)
    return false;
 }
                                                                        /*}}}*/
-// DoDistUpgrade - Automatic smart upgrader                            /*{{{*/
-// ---------------------------------------------------------------------
-/* Intelligent upgrader that will install and remove packages at will */
-bool DoDistUpgrade(CommandLine &CmdL)
-{
-   CacheFile Cache;
-   if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false)
-      return false;
-
-   c0out << _("Calculating upgrade... ") << flush;
-   if (pkgDistUpgrade(*Cache) == false)
-   {
-      c0out << _("Failed") << endl;
-      ShowBroken(c1out,Cache,false);
-      return false;
-   }
-   
-   // parse additional cmdline pkg manipulation switches
-   if(!DoCacheManipulationFromCommandLine(CmdL, Cache))
-      return false;
-
-   c0out << _("Done") << endl;
-   
-   return InstallPackages(Cache,true);
-}
-                                                                       /*}}}*/
 // DoDSelectUpgrade - Do an upgrade by following dselects selections   /*{{{*/
 // ---------------------------------------------------------------------
 /* Follows dselect's selections */
@@ -1403,24 +1379,6 @@ bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher,
    return _error->Error("changelog download failed");
 }
                                                                        /*}}}*/
-// DisplayFileInPager - Display File with pager                                /*{{{*/
-void DisplayFileInPager(string filename)
-{
-   pid_t Process = ExecFork();
-   if (Process == 0)
-   {
-      const char *Args[3];
-      Args[0] = "/usr/bin/sensible-pager";
-      Args[1] = filename.c_str();
-      Args[2] = 0;
-      execvp(Args[0],(char **)Args);
-      exit(100);
-   }
-         
-   // Wait for the subprocess
-   ExecWait(Process, "sensible-pager", false);
-}
-                                                                       /*}}}*/
 // DoChangelog - Get changelog from the command line                   /*{{{*/
 // ---------------------------------------------------------------------
 bool DoChangelog(CommandLine &CmdL)