[Aptitude-devel] r3188 - in branches/aptitude-0.3/aptitude: . src/cmdline

Daniel Burrows dburrows@costa.debian.org
Fri, 29 Apr 2005 16:11:25 +0000


Author: dburrows
Date: Fri Apr 29 16:11:22 2005
New Revision: 3188

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/cmdline/cmdline_resolver.cc
Log:
Fix the crash in the comand-line mode, occasioned by a silly error
in generating an end version itereator (forgot to specify
the cache).

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Fri Apr 29 16:11:22 2005
@@ -1,5 +1,10 @@
 2005-04-29  Daniel Burrows  <dburrows@debian.org>
 
+	* src/cmdline/cmdline_resolver.cc:
+
+	  When tweaking scores, generate an end iterator (not an invalid
+	  iterator) for the UNINST version.
+
 	* src/generic/aptitude_resolver.h:
 
 	  Add some asserts to cache situations that shouldn't happen.

Modified: branches/aptitude-0.3/aptitude/src/cmdline/cmdline_resolver.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/cmdline/cmdline_resolver.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/cmdline/cmdline_resolver.cc	Fri Apr 29 16:11:22 2005
@@ -71,7 +71,7 @@
 						 tweak_amt);
 
 	      if(!instver.end())
-		(*apt_cache_file)->tweak_score(*p, pkgCache::VerIterator(),
+		(*apt_cache_file)->tweak_score(*p, pkgCache::VerIterator(*apt_cache_file),
 					       tweak_amt);
 	    }
 	}