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

Daniel Burrows dburrows at costa.debian.org
Fri Aug 26 00:50:39 UTC 2005


Author: dburrows
Date: Fri Aug 26 00:50:33 2005
New Revision: 3963

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver_universe.cc
Log:
Make solved_by() pass its test.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Fri Aug 26 00:50:33 2005
@@ -1,5 +1,10 @@
 2005-08-25  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/aptitude_resolver_universe.cc:
+
+	  Finally (I hope) fix the case of conflicts-through-provides in
+	  solved_by().  It passes the test now.
+
 	* tests/test_apt_universe.cc:
 
 	  Discard apt errors rather than spewing them out (is this a good

Modified: branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver_universe.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver_universe.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver_universe.cc	Fri Aug 26 00:50:33 2005
@@ -287,11 +287,11 @@
     }
   else
     {
-      // Since provides are never versioned, I never create dependency
-      // objects for versioned dependencies that go through Provides.
-      assert(!d.TargetVer());
-
-      return v.get_ver() != const_cast<pkgCache::PrvIterator &>(prv).OwnerVer();
+      // Only other versions of the provider can solve this.
+      if(v.get_pkg() != const_cast<pkgCache::PrvIterator &>(prv).OwnerPkg())
+	return false;
+      else
+	return v.get_ver() != const_cast<pkgCache::PrvIterator &>(prv).OwnerVer();
     }
 }
 



More information about the Aptitude-svn-commit mailing list