summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-02-15 14:47:24 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-03-13 13:57:34 +0100
commitcb4b85b0bdba6a0c43ca62259dcd35fccd38a45a (patch)
tree3b3bccfceeeb1205e18191b0af7aa96c4d15b0e7 /apt-pkg/algorithms.cc
parent8daf68e366fa9fa2794ae667f51562663856237c (diff)
do not do the same looping twice
Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r--apt-pkg/algorithms.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index db1ebd7e3..4d86e5ff8 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -456,14 +456,8 @@ void pkgProblemResolver::MakeScores()
*/
if (I->CurrentVer != 0 && Cache[I].CandidateVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable())
Score += PrioInstalledAndNotObsolete;
- }
-
- // Now that we have the base scores we go and propagate dependencies
- for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I)
- {
- if (Cache[I].InstallVer == 0)
- continue;
+ // propagate score points along dependencies
for (pkgCache::DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); D.end() == false; ++D)
Scores[D.TargetPkg()->ID] += DepMap[D->Type];
}