diff options
| author | Julian Andres Klode <jak@debian.org> | 2024-11-11 11:59:03 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2024-11-11 11:59:03 +0000 |
| commit | 9a44f3b318d6b7017d1d3dde02b884c906195c86 (patch) | |
| tree | 768ac005d38e38d84ae93efe003bd98fefc72954 /apt-pkg | |
| parent | 1fecaeb8293a3980f6fff312cb1d9f159e7c6b28 (diff) | |
| parent | 2f5aab4afaa61ec9b9c690dea4a0b7d650bb2374 (diff) | |
Merge branch 'keep-more' into 'main'
Fix keeping back removals of obsolete packages
See merge request apt-team/apt!373
Diffstat (limited to 'apt-pkg')
| -rw-r--r-- | apt-pkg/algorithms.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 5869668cd..72184748a 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -1380,8 +1380,7 @@ bool pkgProblemResolver::ResolveByKeepInternal() pkgCache::PkgIterator Pkg = Ver.ParentPkg(); // It is not keepable - if (Cache[Pkg].InstallVer == 0 || - Pkg->CurrentVer == 0) + if (Pkg->CurrentVer == 0) continue; if (not Cache[Pkg].Protect()) @@ -1424,6 +1423,9 @@ bool pkgProblemResolver::ResolveByKeepInternal() delete[] PList; + if (Cache.BrokenCount() != 0) + return _error->Error(_("Unable to correct problems, you have held broken packages.")); + if (Debug) Cache.CheckConsistency("keep done"); |
