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

* apt-pkg/algorithms.cc:
- Do not propagate negative scores from rdepends. Propagating the absolute
value of a negative score may boost obsolete packages and keep them
installed instead of installing their successors. (Closes: #699759)

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

+ 4 - 1
apt-pkg/algorithms.cc

@@ -645,7 +645,10 @@ void pkgProblemResolver::MakeScores()
 	      D->Type != pkgCache::Dep::Recommends))
 	    continue;	 
 	 
-	 Scores[I->ID] += abs(OldScores[D.ParentPkg()->ID]);
+	 // Do not propagate negative scores otherwise
+	 // an extra (-2) package might score better than an optional (-1)
+	 if (OldScores[D.ParentPkg()->ID] > 0)
+	     Scores[I->ID] += OldScores[D.ParentPkg()->ID];
       }      
    }
 

+ 7 - 1
debian/changelog

@@ -4,7 +4,13 @@ apt (0.9.7.9) UNRELEASED; urgency=low
   * properly handle if-modfied-since with libcurl/https 
     (closes: #705648)
   
- -- Michael Vogt <michael.vogt@ubuntu.com>  Wed, 08 May 2013 16:20:13 +0200
+  [ Andreas Beckman ]
+  * apt-pkg/algorithms.cc:
+    - Do not propagate negative scores from rdepends. Propagating the absolute
+      value of a negative score may boost obsolete packages and keep them
+      installed instead of installing their successors.  (Closes: #699759)
+  
+ -- Michael Vogt <mvo@debian.org>  Wed, 08 May 2013 17:46:10 +0200
 
 apt (0.9.7.8) unstable; urgency=criticial