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

Daniel Burrows dburrows@costa.debian.org
Mon Jul 11 05:53:57 UTC 2005


Author: dburrows
Date: Mon Jul 11 05:53:53 2005
New Revision: 3644

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver.cc
   branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver.h
Log:
Fix the initial scan for currently broken packages: the first virtual
package that was encountered would BREAK all checks of later non-virtual
dependencies.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Mon Jul 11 05:53:53 2005
@@ -1,5 +1,12 @@
 2005-07-11  Daniel Burrows  <dburrows@debian.org>
 
+	* src/generic/aptitude_resolver.h:
+
+	  When leaving a Provides list while iterating over broken deps,
+	  make sure to explicitly set the variable indicating whether the
+	  list is open or not to "false" (oops!).  The other pieces of
+	  code that use the prv_open pattern seem to handle it correctly.
+
 	* src/pkg_grouppolicy.cc, src/pkg_grouppolicy.h:
 
 	  Add missing virtual destructor for pkg_grouppolicy_factory.

Modified: branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver.cc	Mon Jul 11 05:53:53 2005
@@ -29,6 +29,14 @@
 {
 }
 
+void aptitude_universe::broken_dep_iterator::check_for_libjack()
+{
+  bool is_libjack_0800=!pkg.end() && pkg.Name() && !strcmp(pkg.Name(), "libjack0.80.0-0");
+  if(is_libjack_0800)
+    std::cout << "Found libjack0.80.0-0." << std::endl;
+}
+
+
 void aptitude_resolver::add_action_scores(int preserve_score, int auto_score,
 					  int remove_score, int keep_score,
 					  int install_score, int upgrade_score,

Modified: branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver.h	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver.h	Mon Jul 11 05:53:53 2005
@@ -1172,9 +1172,13 @@
       return ((*cache)[d2] & pkgDepCache::DepGInstall)==0;
     }
 
+    void check_for_libjack();
+
     // Push forward to the next interesting point.
     void normalize()
     {
+      check_for_libjack();
+
       while(!the_dep.end() &&
 	    !(the_dep.IsCritical() &&
 	      dep_is_inst_broken(the_dep)))
@@ -1186,8 +1190,12 @@
 	  // Otherwise we just spin on the same package over and over,
 	  // since it's still broken..
 	  ++pkg;
+	  check_for_libjack();
 	  while(!pkg.end() && !(*cache)[pkg].InstBroken())
-	    ++pkg;
+	    {
+	      ++pkg;
+	      check_for_libjack();
+	    }
 
 	  if(!pkg.end())
 	    {
@@ -1268,6 +1276,7 @@
 	  // again.  (probably this was only a self-conflict and
 	  // nothing else)
 	  ++the_dep;
+	  prv_open=false;
 	  normalize();
 	  // hopefully g++ is smart enough to optimize this into a
 	  // tail call.




More information about the Aptitude-svn-commit mailing list