diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-10-13 15:36:54 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-10-13 15:36:54 +0200 |
commit | 61153c284c832a0d0f7faecd9ad96f6cd9591c64 (patch) | |
tree | a60d61b723bbc90b8b715a476c5f1ee5e8d6e0c2 /apt-pkg/algorithms.cc | |
parent | 940ff5d6b5634b57c2e622b5295f499a7807f3de (diff) | |
parent | 6bea738672fb503d2813ae2d998096015a81c4a2 (diff) |
merged from debian-sid branch
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r-- | apt-pkg/algorithms.cc | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 3c8711b74..961f5c2fa 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -987,6 +987,23 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) pkgCache::VerIterator Ver(Cache,*V); pkgCache::PkgIterator Pkg = Ver.ParentPkg(); + /* 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)) + { + if (Debug) + clog << " Conflicts//Breaks against version " + << Ver.VerStr() << " for " << Pkg.Name() + << " but that is not InstVer, ignoring" + << endl; + continue; + } + if (Debug == true) clog << " Considering " << Pkg.FullName(false) << ' ' << (int)Scores[Pkg->ID] << " as a solution to " << I.FullName(false) << ' ' << (int)Scores[I->ID] << endl; @@ -1069,22 +1086,14 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) } else { - /* 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::Obsoletes)) - continue; - if (Start->Type == pkgCache::Dep::DpkgBreaks) { // first, try upgradring the package, if that // does not help, the breaks goes onto the // kill list + // // FIXME: use DoUpgrade(Pkg) instead? - if (Cache[End] & pkgDepCache::DepGCVer) + if (Cache[End] & pkgDepCache::DepGCVer) { if (Debug) clog << " Upgrading " << Pkg.FullName(false) << " due to Breaks field in " << I.FullName(false) << endl; |