diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-06-23 21:43:18 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-06-23 21:43:18 +0200 |
commit | 3a998f6ad4aab8b55b5c8c35927c38b9f53018c4 (patch) | |
tree | 2241edaeccddeecd0ed099d1b9f9e9d73a28b1fd /apt-pkg/algorithms.cc | |
parent | ccd8e28fe16bf8e80db65e330ed89454c0104f80 (diff) | |
download | apt-3a998f6ad4aab8b55b5c8c35927c38b9f53018c4.tar.gz |
* apt-pkg/algorithms.cc:
- consider recommends when making the scores for the problem
resolver
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r-- | apt-pkg/algorithms.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index bd33d5ef..b6f4705f 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -526,7 +526,9 @@ void pkgProblemResolver::MakeScores() for (pkgCache::DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); D.end() == false; D++) { - if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends) + if (D->Type == pkgCache::Dep::Depends || + D->Type == pkgCache::Dep::PreDepends || + D->Type == pkgCache::Dep::Recommends) Scores[D.TargetPkg()->ID]++; } } @@ -547,7 +549,9 @@ void pkgProblemResolver::MakeScores() { // Only do it for the install version if ((pkgCache::Version *)D.ParentVer() != Cache[D.ParentPkg()].InstallVer || - (D->Type != pkgCache::Dep::Depends && D->Type != pkgCache::Dep::PreDepends)) + (D->Type != pkgCache::Dep::Depends && + D->Type != pkgCache::Dep::PreDepends && + D->Type != pkgCache::Dep::Recommends)) continue; Scores[I->ID] += abs(OldScores[D.ParentPkg()->ID]); |