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

Daniel Burrows dburrows at costa.debian.org
Thu Aug 25 23:17:02 UTC 2005


Author: dburrows
Date: Thu Aug 25 23:16:59 2005
New Revision: 3958

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver_universe.h
Log:
Fix the dependency abstraction to correctly ignore garbage
caused by dereferencing a revdep_iterator through a Provides.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Thu Aug 25 23:16:59 2005
@@ -1,5 +1,13 @@
 2005-08-25  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/aptitude_resolver_universe.h:
+
+	  When comparing dependencies, ignore the attached provides
+	  iterator unless the dependency is a conflict.  This solves
+	  problems caused by junk Provides iterators showing up when
+	  revdep_iterators that passed through a Provides were
+	  dereferenced.
+
 	* tests/test_apt_universe.cc:
 
 	  Fix the connectivity test to actually ignore stuff that fixes

Modified: branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver_universe.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver_universe.h	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver_universe.h	Thu Aug 25 23:16:59 2005
@@ -227,12 +227,14 @@
 
   bool operator==(const aptitude_resolver_dep &other) const
   {
-    return start == other.start && prv == other.prv;
+    return start == other.start &&
+      (start->Type != pkgCache::Dep::Conflicts || prv == other.prv);
   }
 
   bool operator!=(const aptitude_resolver_dep &other) const
   {
-    return start != other.start || prv != other.prv;
+    return start != other.start ||
+      (start->Type == pkgCache::Dep::Conflicts && prv != other.prv);
   }
 
   bool operator<(const aptitude_resolver_dep &other) const
@@ -241,6 +243,8 @@
       return true;
     else if(((const pkgCache::Dependency *) start) > ((const pkgCache::Dependency *) other.start))
       return false;
+    else if(start->Type != pkgCache::Dep::Conflicts)
+      return false;
     else if(((const pkgCache::Provides *) prv) < ((const pkgCache::Provides *) other.prv))
       return true;
     else



More information about the Aptitude-svn-commit mailing list