X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/d39d7f885d61bfe296c131c83bdc042a2ab6b0d7..0740a31033739ba30e7cb6754111f968167cbbf5:/cmdline/apt-internal-solver.cc diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc index 5fda7b6a0..0f2ec6283 100644 --- a/cmdline/apt-internal-solver.cc +++ b/cmdline/apt-internal-solver.cc @@ -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 + DropPrivs(); + 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";