diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2024-07-01 16:27:15 +0200 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2024-07-01 16:28:53 +0200 |
| commit | b636668788fe8b1f7183b21eaf7b87f34209169e (patch) | |
| tree | 0b8db4d36be442227318780bd4665fe948a81433 /apt-pkg/solver3.cc | |
| parent | 053c889838bdc2c6efd3a542ec3dfd547a5df53e (diff) | |
solver3: Do not accidentally promote Replaces and Enhances to dependencies
As part of the refactoring, we allowed the code to work on unimportant
dependencies as we needed to promote Suggests to Depends if they are
currently satisfied.
However, Replaces and Enhances were not considered properly and both
are not negative dependencies so they were accidentally promoted to
Depends too if they were currently satisfied.
Diffstat (limited to 'apt-pkg/solver3.cc')
| -rw-r--r-- | apt-pkg/solver3.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/solver3.cc b/apt-pkg/solver3.cc index dc70adbde..f94fa6736 100644 --- a/apt-pkg/solver3.cc +++ b/apt-pkg/solver3.cc @@ -480,7 +480,9 @@ bool APT::Solver::EnqueueOrGroup(pkgCache::DepIterator start, pkgCache::DepItera // below once we have calculated all possible solutions. if (start.ParentPkg()->CurrentVer == 0 && not policy.IsImportantDep(start)) return true; - + // Replaces and Enhances are not a real dependency. + if (start->Type == pkgCache::Dep::Replaces || start->Type == pkgCache::Dep::Enhances) + return true; if (unlikely(debug >= 3)) std::cerr << "Found dependency critical " << Ver.ParentPkg().FullName() << "=" << Ver.VerStr() << " -> " << start.TargetPkg().FullName() << "\n"; |
