summaryrefslogtreecommitdiffstats
path: root/apt-pkg/upgrade.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/upgrade.cc')
-rw-r--r--apt-pkg/upgrade.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/upgrade.cc b/apt-pkg/upgrade.cc
index fad4783..ac0b71c 100644
--- a/apt-pkg/upgrade.cc
+++ b/apt-pkg/upgrade.cc
@@ -312,6 +312,11 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache)
// APT::Upgrade::Upgrade - Upgrade using a specific strategy /*{{{*/
bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode, OpProgress * const Progress)
{
+ _config->Set("APT::Solver::Upgrade", "true");
+ if (mode & FORBID_REMOVE_PACKAGES)
+ _config->Set("APT::Solver::Remove", "false");
+ if (mode & FORBID_INSTALL_NEW_PACKAGES)
+ _config->Set("APT::Solver::Install", "false");
if (mode == ALLOW_EVERYTHING)
return pkgDistUpgrade(Cache, Progress);
else if ((mode & ~FORBID_REMOVE_PACKAGES) == 0)