]> git.saurik.com Git - apt.git/blobdiff - apt-private/private-upgrade.cc
query an empty pkgAcqIndexDiffs if index is up-to-date
[apt.git] / apt-private / private-upgrade.cc
index 00608866f8fdb9956ee19a47d027b25ca78c533c..e76b5d7fc0efd6e29d255050db3db7108c51aa20 100644 (file)
@@ -1,5 +1,6 @@
 // Includes                                                            /*{{{*/
 #include <apt-pkg/algorithms.h>
+#include <apt-pkg/upgrade.h>
 #include <iostream>
 #include "private-install.h"
 #include "private-cachefile.h"
@@ -14,19 +15,18 @@ static bool UpgradeHelper(CommandLine &CmdL, int UpgradeFlags)
    if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false)
       return false;
 
-   //c0out << _("Calculating upgrade... ") << std::flush;
+   c0out << _("Calculating upgrade... ") << std::flush;
    if (APT::Upgrade::Upgrade(Cache, UpgradeFlags) == false)
    {
       c0out << _("Failed") << std::endl;
       ShowBroken(c1out,Cache,false);
       return _error->Error(_("Internal error, Upgrade broke stuff"));
    }
+   c0out << _("Done") << std::endl;
 
    // parse additional cmdline pkg manipulation switches
    if(!DoCacheManipulationFromCommandLine(CmdL, Cache))
       return false;
-
-   //c0out << _("Done") << std::endl;
    
    return InstallPackages(Cache,true);
 }
@@ -48,7 +48,7 @@ bool DoUpgradeNoNewPackages(CommandLine &CmdL)
    // Do the upgrade
    return UpgradeHelper(CmdL, 
                         APT::Upgrade::FORBID_REMOVE_PACKAGES|
-                        APT::Upgrade::FORBID_NEW_INSTALL_PACKAGES);
+                        APT::Upgrade::FORBID_INSTALL_NEW_PACKAGES);
 }
                                                                        /*}}}*/
 // DoSafeUpgrade - Upgrade all packages with install but not remove    /*{{{*/