]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/algorithms.cc
Portuguse translation updated. Closes: #423111
[apt.git] / apt-pkg / algorithms.cc
index 0d486d10254b2f84caa1728959d7165a3594fa6e..5fa16e66f9bd9f45095feff8af40f6302c7f3228 100644 (file)
@@ -497,7 +497,7 @@ void pkgProblemResolver::MakeScores()
          on the same level. We enhance the score of installed packages 
         if those are not obsolete
       */
-      if (I->CurrentVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable())
+      if (I->CurrentVer != 0 && Cache[I].CandidateVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable())
         Score += 1;
    }
 
@@ -841,7 +841,12 @@ bool pkgProblemResolver::Resolve(bool BrokenFix)
               OldEnd = LEnd;
            }
            else
+            {
               Start++;
+              // We only worry about critical deps.
+              if (Start.IsCritical() != true)
+                  continue;
+            }
 
            // Dep is ok
            if ((Cache[End] & pkgDepCache::DepGInstall) == pkgDepCache::DepGInstall)