summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/solver3.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/solver3.cc b/apt-pkg/solver3.cc
index 38c3e8f4a..6b0cfe971 100644
--- a/apt-pkg/solver3.cc
+++ b/apt-pkg/solver3.cc
@@ -879,8 +879,10 @@ bool APT::Solver::FromDepCache(pkgDepCache &depcache)
{
for (auto P = cache.PkgBegin(); not P.end(); P++)
{
+ bool isForced = depcache[P].Protect() && depcache[P].Install();
+ bool isPhasing = IsUpgrade && depcache.PhasingApplied(P) && not isForced;
for (auto V = P.VersionList(); not V.end(); ++V)
- if (P.CurrentVer() != V && depcache.GetCandidateVersion(P) != V)
+ if (P.CurrentVer() != V && (depcache.GetCandidateVersion(P) != V || isPhasing))
if (not Enqueue(Var(V), false, {}))
return false;
}