]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/algorithms.cc
- ensure proper permissions in the extended_state file (LP#67037)
[apt.git] / apt-pkg / algorithms.cc
index 5e878ff650d85a9a12026fdd2463e4f6fbe5feb0..bd814729155e6380a2b61f70bb37a6b3316cb456 100644 (file)
@@ -512,7 +512,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;
    }
 
@@ -861,7 +861,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)