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

* apt-pkg/algorithms.cc:
- only increase the score of installed applications if they are not
obsolte (still downloadable)

Michael Vogt лет назад: 19
Родитель
Сommit
4172c78468
2 измененных файлов с 8 добавлено и 4 удалено
  1. 4 2
      apt-pkg/algorithms.cc
  2. 4 2
      debian/changelog

+ 4 - 2
apt-pkg/algorithms.cc

@@ -494,8 +494,10 @@ void pkgProblemResolver::MakeScores()
 	 Score += PrioMap[Cache[I].InstVerIter(Cache)->Priority];
       
       /* This helps to fix oddball problems with conflicting packages
-         on the same level. We enhance the score of installed packages */
-      if (I->CurrentVer != 0)
+         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())
 	 Score += 1;
    }
 

+ 4 - 2
debian/changelog

@@ -1,9 +1,11 @@
-apt (0.6.46.5) unstable; urgency=low
+apt (0.6.46.5) UNRELEASED; urgency=low
 
   * apt-pkg/algorithm.cc:
     - use clog for all debugging
+    - only increase the score of installed applications if they 
+      are not obsolete 
 
- --
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 18 Dec 2006 19:39:05 +0100
 
 apt (0.6.46.4) unstable; urgency=high