From: Michael Vogt Date: Tue, 23 Jun 2009 19:43:18 +0000 (+0200) Subject: * apt-pkg/algorithms.cc: X-Git-Tag: 0.7.22~6^2~7 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/3a998f6ad4aab8b55b5c8c35927c38b9f53018c4?hp=ccd8e28fe16bf8e80db65e330ed89454c0104f80 * apt-pkg/algorithms.cc: - consider recommends when making the scores for the problem resolver --- diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index bd33d5ef1..b6f4705f3 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]); diff --git a/debian/changelog b/debian/changelog index 60db448c0..ba57dbadc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,9 @@ apt (0.7.21) UNRELEASED; urgency=low - add Dpkg::UseIoNice boolean option to run dpkg with ionice -c3 (off by default) - send "dpkg-exec" message on the status fd when dpkg is run + * apt-pkg/algorithms.cc: + - consider recommends when making the scores for the problem + resolver -- Michael Vogt Thu, 28 May 2009 17:51:42 +0200