[Aptitude-devel] r3223 - in branches/aptitude-0.3/aptitude: . src/generic

Daniel Burrows dburrows@costa.debian.org
Sun, 01 May 2005 13:54:38 +0000


Author: dburrows
Date: Sun May  1 13:54:35 2005
New Revision: 3223

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver.cc
Log:
When tweaking scores based on priority, don't tweak the score
of the not-installed version.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Sun May  1 13:54:35 2005
@@ -1,3 +1,10 @@
+2005-05-01  Daniel Burrows  <dburrows@debian.org>
+
+	* src/generic/aptitude_resolver.cc:
+
+	  When tweaking scores based on priority, don't tweak the score of
+	  the not-installed version.
+
 2005-04-30  Daniel Burrows  <dburrows@debian.org>
 
 	* doc/en/aptitude.xml:

Modified: branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver.cc	Sun May  1 13:54:35 2005
@@ -100,6 +100,9 @@
       !pi.end(); ++pi)
     for(aptitude_universe::package::version_iterator vi=(*pi).versions_begin(); !vi.end(); ++vi)
       {
+	if(vi.get_ver().end())
+	  continue;
+
 	int score_tweak=0;
 	switch(vi.get_ver()->Priority)
 	  {