- /* Ignore a target that is not a candidate
- This can happen if:
- installed package provides video-6
- candidate provides video-8
- now if a package Start breaks/conflicts video-6
- Start.AllTargets() will return the now-installed
- versions even though these are not candidates
- we can ignore them
- */
- if (Cache[Pkg].CandidateVerIter(Cache) != Ver)
+ /* This is a conflicts, and the version we are looking
+ at is not the currently selected version of the
+ package, which means it is not necessary to
+ remove/keep */
+ if (Cache[Pkg].InstallVer != Ver &&
+ (Start->Type == pkgCache::Dep::Conflicts ||
+ Start->Type == pkgCache::Dep::DpkgBreaks ||
+ Start->Type == pkgCache::Dep::Obsoletes))