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

Daniel Burrows dburrows at costa.debian.org
Fri Aug 19 20:45:15 UTC 2005


Author: dburrows
Date: Fri Aug 19 20:45:12 2005
New Revision: 3928

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/aptcache.cc
Log:
Signal a change whenever we run out of solutions.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Fri Aug 19 20:45:12 2005
@@ -1,5 +1,9 @@
 2005-08-19  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/aptcache.cc:
+
+	  Call selected_solution_changed() when we run out of solutions.
+
 	* src/broken_indicator.cc:
 
 	  When displaying the summary of the current number of broken

Modified: branches/aptitude-0.3/aptitude/src/generic/aptcache.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/aptcache.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/aptcache.cc	Fri Aug 19 20:45:12 2005
@@ -1595,6 +1595,10 @@
 	out_of_time=true;
 	throw NoMoreTime();
       }
+      catch(NoMoreSolutions) {
+	selected_solution_changed();
+	throw NoMoreSolutions();
+      }
     }
   else if(selected_solution<solutions.size()-1)
     {
@@ -1606,7 +1610,16 @@
     {
       // otherwise weirdness is happening.
       assert(!out_of_time);
-      solutions.push_back(new aptitude_resolver::solution(resolver->find_next_solution(aptcfg->FindI(PACKAGE "::ProblemResolver::StepLimit", 5000))));
+
+      try
+	{
+	  solutions.push_back(new aptitude_resolver::solution(resolver->find_next_solution(aptcfg->FindI(PACKAGE "::ProblemResolver::StepLimit", 5000))));
+	}
+      catch(NoMoreSolutions)
+	{
+	  selected_solution_changed();
+	  throw NoMoreSolutions();
+	}
       ++selected_solution;
       selected_solution_changed();
       return *solutions.back();



More information about the Aptitude-svn-commit mailing list