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

Daniel Burrows dburrows at costa.debian.org
Sat Sep 24 19:18:42 UTC 2005


Author: dburrows
Date: Sat Sep 24 19:18:39 2005
New Revision: 4242

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc
Log:
Use the resolver counts to set the solutions_exhausted member of the state
snapshot, fixing the bug where the state indicator wasn't updated to reflect
the 'are there more solutions?' state of the resolver.


Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Sat Sep 24 19:18:39 2005
@@ -1,5 +1,11 @@
 2005-09-24  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/resolver_manager.cc:
+
+	  Use the resolver counts instead of out_of_solutions to set the
+	  solutions_exhausted member of the state snapshot.  This fixes
+	  the 'are there more solutions?' indicator.
+
 	* src/generic/problemresolver/problemresolver.h:
 
 	  Add an element to the counts cache that mirrors 'finished', and

Modified: branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/resolver_manager.cc	Sat Sep 24 19:18:39 2005
@@ -441,12 +441,9 @@
   rval.selected_solution        = selected_solution;
   rval.generated_solutions      = solutions.size();
   rval.resolver_exists          = (resolver != NULL);
-  rval.solutions_exhausted      = out_of_solutions.take();
   rval.background_thread_active = (!pending_jobs.empty() || background_thread_in_resolver);
 
-  out_of_solutions.put(rval.solutions_exhausted);
-
-  if(resolver)
+  if(resolver != NULL)
     {
       aptitude_resolver::queue_counts c = resolver->get_counts();
 
@@ -454,6 +451,7 @@
       rval.closed_size    = c.closed;
       rval.deferred_size  = c.deferred;
       rval.conflicts_size = c.conflicts;
+      rval.solutions_exhausted = (rval.open_size == 0 && c.finished);
     }
   else
     {
@@ -461,6 +459,8 @@
       rval.closed_size    = 0;
       rval.deferred_size  = 0;
       rval.conflicts_size = 0;
+
+      rval.solutions_exhausted = false;
     }
 
   return rval;



More information about the Aptitude-svn-commit mailing list