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

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


Author: dburrows
Date: Fri Apr 29 16:21:04 2005
New Revision: 3190

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/cmdline/cmdline_resolver.cc
Log:
Iterate over the whole version list when tweaking scores.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Fri Apr 29 16:21:04 2005
@@ -2,6 +2,11 @@
 
 	* src/cmdline/cmdline_resolver.cc:
 
+	  Oops, iterate over the whole version list, not just the part of
+	  it that follows the current version.
+
+	* src/cmdline/cmdline_resolver.cc:
+
 	  Uninvert the tweaking logic: now, instead of giving a bonus to
 	  removal if the user *didn't* ask for a package to be removed, we
 	  give a bonus to removal if the user *did* ask for a package to

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:21:04 2005
@@ -64,7 +64,7 @@
 	      pkgDepCache::StateCache &state=(*apt_cache_file)[*p];
 	      pkgCache::VerIterator instver=state.InstVerIter(*apt_cache_file);
 
-	      for(pkgCache::VerIterator v=p->CurrentVer();
+	      for(pkgCache::VerIterator v=p->VersionList();
 		  !v.end(); ++v)
 		if(instver == v)
 		  (*apt_cache_file)->tweak_score(*p, v,