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

Daniel Burrows dburrows at costa.debian.org
Mon Aug 15 19:20:13 UTC 2005


Author: dburrows
Date: Mon Aug 15 19:20:10 2005
New Revision: 3842

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
Log:
Don't immediately dismiss the option of leaving a soft dependency unresolved.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Mon Aug 15 19:20:10 2005
@@ -1,5 +1,12 @@
 2005-08-15  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/problemresolver/problemresolver.h:
+
+	  Fix comparison-by-contents of solutions so that the set of
+	  unresolved soft dependencies is taken into account; should fix
+	  the bug where the option of leaving a soft dependency unresolved
+	  was dismissed immediately.
+
 	* src/generic/problemresolver/solution.h:
 
 	  Write operator== and operator!= that obey the rule about action

Modified: branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h	Mon Aug 15 19:20:10 2005
@@ -198,8 +198,10 @@
       typename std::map<package,action>::const_iterator i1,i2;
       const std::map<package,action>
 	&a1=s1.get_actions(), &a2=s2.get_actions();
+      const std::set<dep>
+	&us1=s1.get_unresolved_soft_deps(), &us2=s2.get_unresolved_soft_deps();
 
-      return a1 < a2;
+      return a1 < a2 || (a2 == a1 && us1 < us2);
     }
   };
 



More information about the Aptitude-svn-commit mailing list