Просмотр исходного кода

* apt-pkg/algorithms.cc:
- make sure we have a candidateVer if we check it for downloadability

Michael Vogt лет назад: 19
Родитель
Сommit
020daa7b02
2 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      apt-pkg/algorithms.cc
  2. 2 2
      po/apt-all.pot

+ 1 - 1
apt-pkg/algorithms.cc

@@ -497,7 +497,7 @@ void pkgProblemResolver::MakeScores()
          on the same level. We enhance the score of installed packages 
          on the same level. We enhance the score of installed packages 
 	 if those are not obsolete
 	 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;
 	 Score += 1;
    }
    }
 
 

+ 2 - 2
po/apt-all.pot

@@ -2191,13 +2191,13 @@ msgid ""
 "The package %s needs to be reinstalled, but I can't find an archive for it."
 "The package %s needs to be reinstalled, but I can't find an archive for it."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/algorithms.cc:1061
+#: apt-pkg/algorithms.cc:1066
 msgid ""
 msgid ""
 "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by "
 "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by "
 "held packages."
 "held packages."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/algorithms.cc:1063
+#: apt-pkg/algorithms.cc:1068
 msgid "Unable to correct problems, you have held broken packages."
 msgid "Unable to correct problems, you have held broken packages."
 msgstr ""
 msgstr ""