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

Daniel Burrows dburrows at costa.debian.org
Wed Aug 17 22:45:09 UTC 2005


Author: dburrows
Date: Wed Aug 17 22:45:06 2005
New Revision: 3902

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/aptcache.cc
Log:
Penalize broken soft deps less than removals (avoids removing packages in order
to fulfill their Recommends fields, sort of).

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Wed Aug 17 22:45:06 2005
@@ -1,5 +1,11 @@
 2005-08-17  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/aptcache.cc:
+
+	  Penalize broken soft deps less than removals, and add some
+	  cautionary text about the danger of fiddling with the resolver
+	  settings.
+
 	* src/cmdline/cmdline_resolver.cc:
 
 	  In the 'story', make sure to insert the dep_text with %ls, not

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	Wed Aug 17 22:45:06 2005
@@ -1355,9 +1355,23 @@
 {
   assert(resolver==NULL);
 
+  // NOTE: the performance of the resolver is highly sensitive to
+  // these settings; choosing bad ones can result in hitting
+  // exponential cases in practical situations.  In general,
+  // penalizing actions means that the resolver will be more likely to
+  // blow up trying to avoid them, with the danger increasing as the
+  // penalty does.  Thus, aside from broken deps (which are penalized
+  // to guide us towards a solution), I only penalize removals (which
+  // are usually either unnecessary or easy to prove necessary) and
+  // leaving soft dependencies (recommendations) unfixed.  The
+  // relative penalties of these are also important; for instance,
+  // penalizing unfixed soft deps more than removals means that the
+  // resolver will actually remove packages rather than leaving their
+  // Recommends: field unsatisfied!
+
   resolver=new aptitude_resolver(aptcfg->FindI(PACKAGE "::ProblemResolver::StepScore", 10),
 				 aptcfg->FindI(PACKAGE "::ProblemResolver::BrokenScore", -100),
-				 aptcfg->FindI(PACKAGE "::ProblemResolver::UnfixedSoftScore", -10000),
+				 aptcfg->FindI(PACKAGE "::ProblemResolver::UnfixedSoftScore", -200),
 				 aptcfg->FindI(PACKAGE "::ProblemResolver::Infinity", 1000000),
 				 aptcfg->FindI(PACKAGE "::ProblemResolver::Max-Successors", 0),
 				 aptcfg->FindI(PACKAGE "::ProblemResolver::ResolutionScore", 50),



More information about the Aptitude-svn-commit mailing list