]> git.saurik.com Git - apt.git/blobdiff - apt-private/private-upgrade.cc
call dpkg with --no-triggers by default
[apt.git] / apt-private / private-upgrade.cc
index 68b2c5e00a2a31691470f8b0a7df6b5518f5a499..679140bfd3215c43c1430ed08b3e9e250361cb4b 100644 (file)
 static bool UpgradeHelper(CommandLine &CmdL, int UpgradeFlags)
 {
    CacheFile Cache;
+   std::vector<std::string> VolatileCmdL;
+   Cache.GetSourceList()->AddVolatileFiles(CmdL, &VolatileCmdL);
+
    if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false)
       return false;
 
-   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))
+   if(!DoCacheManipulationFromCommandLine(CmdL, VolatileCmdL,  Cache, UpgradeFlags))
       return false;
-   
+
    return InstallPackages(Cache,true);
 }
 
@@ -43,7 +36,7 @@ static bool UpgradeHelper(CommandLine &CmdL, int UpgradeFlags)
 /* Intelligent upgrader that will install and remove packages at will */
 bool DoDistUpgrade(CommandLine &CmdL)
 {
-   return UpgradeHelper(CmdL, 0);
+   return UpgradeHelper(CmdL, APT::Upgrade::ALLOW_EVERYTHING);
 }
                                                                        /*}}}*/
 bool DoUpgrade(CommandLine &CmdL)                                      /*{{{*/