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

Daniel Burrows dburrows at costa.debian.org
Mon Sep 12 23:25:04 UTC 2005


Author: dburrows
Date: Mon Sep 12 23:25:01 2005
New Revision: 4074

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/aptcache.cc
Log:
Only run mark-and-sweep after setting a candidate version if the grouping level is 0.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Mon Sep 12 23:25:01 2005
@@ -1,5 +1,10 @@
 2005-09-12  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/aptcache.cc:
+
+	  Only run mark-and-sweep after setting a candidate version if the
+	  grouping level is 0.
+
 	* src/generic/problemresolver/problemresolver.h:
 
 	  I embarassingly forgot to initialize solver_cancelled and

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	Mon Sep 12 23:25:01 2005
@@ -861,15 +861,10 @@
 
   if(!ver.end())
     {
-      // Use the InstVerIter instead of GetCandidateVersion, since that seems
-      // to store the currently to-be-installed version.
+      // Use the InstVerIter instead of GetCandidateVersion, since
+      // that seems to store the currently to-be-installed version.
       VerIterator prev=(*this)[(ver.ParentPkg())].InstVerIter(GetCache());
 
-      discard_resolver(undo);
-
-      if(undo)
-	undo->add_item(new candver_undoer(prev, this));
-
       aptitude_state &estate = get_ext_state(ver.ParentPkg());
 
       if(ver!=GetCandidateVer(ver.ParentPkg()))
@@ -881,15 +876,23 @@
 
       SetCandidateVersion(ver);
 
-      mark_and_sweep(undo);
+      if(group_level == 0)
+	{
+	  if(undo)
+	    undo->add_item(new candver_undoer(prev, this));
 
-      //if(BrokenCount()>0)
-      //create_resolver();
-      //
-      // EW - rely on the fact that mark_and_sweep implicitly calls
-      // begin/end_action_group(), which in turn does just this.
+	  discard_resolver(undo);
 
-      package_state_changed();
+	  mark_and_sweep(undo);
+
+	  //if(BrokenCount()>0)
+	  //create_resolver();
+	  //
+	  // EW - rely on the fact that mark_and_sweep implicitly calls
+	  // begin/end_action_group(), which in turn does just this.
+
+	  package_state_changed();
+	}
     }
 }
 



More information about the Aptitude-svn-commit mailing list