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

Daniel Burrows dburrows@costa.debian.org
Sat, 23 Apr 2005 02:32:51 +0000


Author: dburrows
Date: Sat Apr 23 02:32:48 2005
New Revision: 3066

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
Log:
Be more correct by always throwing NoMoreSolutions when solutions
are exhausted.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Sat Apr 23 02:32:48 2005
@@ -1,5 +1,11 @@
 2005-04-22  Daniel Burrows  <dburrows@debian.org>
 
+	* src/generic/problemresolver/problemresolver.h:
+
+	  For more correctness, always throw NoMoreSolutions when we're
+	  out of potential solutions, even if the last element of the open
+	  queue is a solution.
+
 	* src/broken_indicator.cc:
 
 	  Incorporate the solution counts into the suggestion bar.

Modified: branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h	Sat Apr 23 02:32:48 2005
@@ -843,6 +843,12 @@
 		s.dump(std::cout);
 		std::cout << std::endl;
 	      }
+
+	    // Set it here too in case the last tentative solution is
+	    // really a solution.
+	    if(open.empty())
+	      finished=true;
+
 	    return s;
 	  }
 	// Nope, let's go enqueue successor nodes.