]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-internal-solver.cc
debian/apt.postinst: chown _apt:root /etc/apt/auth.conf
[apt.git] / cmdline / apt-internal-solver.cc
index 5fda7b6a0af4d393626967a4ecec12e5cd20b7d8..92a4429e5789a408a7b4c8350b11300c3c18327e 100644 (file)
@@ -76,6 +76,9 @@ int main(int argc,const char *argv[])                                 /*{{{*/
                {'o',"option",0,CommandLine::ArbItem},
                {0,0,0,0}};
 
+        // we really don't need anything
+        DropPrivileges();
+
        CommandLine CmdL(Args,_config);
        if (pkgInitConfig(*_config) == false ||
            CmdL.Parse(argc,argv) == false) {
@@ -172,10 +175,10 @@ int main(int argc,const char *argv[])                                     /*{{{*/
 
        std::string failure;
        if (upgrade == true) {
-               if (pkgAllUpgrade(CacheFile) == false)
+               if (APT::Upgrade::Upgrade(CacheFile, APT::Upgrade::FORBID_REMOVE_PACKAGES | APT::Upgrade::FORBID_INSTALL_NEW_PACKAGES) == false)
                        failure = "ERR_UNSOLVABLE_UPGRADE";
        } else if (distUpgrade == true) {
-               if (pkgDistUpgrade(CacheFile) == false)
+               if (APT::Upgrade::Upgrade(CacheFile, APT::Upgrade::ALLOW_EVERYTHING) == false)
                        failure = "ERR_UNSOLVABLE_DIST_UPGRADE";
        } else if (Fix.Resolve() == false)
                failure = "ERR_UNSOLVABLE";