[Aptitude-svn-commit] r3407 - in branches/aptitude-0.3/aptitude: . src

Daniel Burrows dburrows@costa.debian.org
Wed, 15 Jun 2005 23:12:46 +0000


Author: dburrows
Date: Wed Jun 15 23:12:44 2005
New Revision: 3407

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/broken_indicator.cc
Log:
Fix a bug in the solution summary (phantom installs)

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Wed Jun 15 23:12:44 2005
@@ -1,5 +1,11 @@
 2005-06-15  Daniel Burrows  <dburrows@debian.org>
 
+	* src/broken_indicator.cc:
+
+	Fix the generation of the solution summary: due to a logic error,
+	cancelled installations were being counted as installations rather
+	than keeps.
+
 	* src/vscreen/curses++.cc, src/vscreen/curses++.h:
 
 	Fix the missing reference to operator=(wstring&) in wchstring by

Modified: branches/aptitude-0.3/aptitude/src/broken_indicator.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/broken_indicator.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/broken_indicator.cc	Wed Jun 15 23:12:44 2005
@@ -122,12 +122,12 @@
 	    // If not, we have a problem.
 	    assert(instver!=newver);
 
-	    if(curver.end())
+	    if(newver == curver)
+	      ++keep_count;
+	    else if(curver.end())
 	      ++install_count;
 	    else if(newver.end())
 	      ++remove_count;
-	    else if(newver == curver)
-	      ++keep_count;
 	    else
 	      {
 		int cmp=_system->VS->CmpVersion(curver.VerStr(),