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

Daniel Burrows dburrows at costa.debian.org
Thu Aug 25 22:00:05 UTC 2005


Author: dburrows
Date: Thu Aug 25 22:00:01 2005
New Revision: 3953

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/aptitude_resolver_universe.cc
Log:
More fixes to conflicts-through-provides.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Thu Aug 25 22:00:01 2005
@@ -2,6 +2,13 @@
 
 	* src/generic/aptitude_resolver_universe.cc:
 
+	  Further fix handling of conflicts-through-provides in
+	  solved_by(): claim that any version not providing the conflicted
+	  package "solves" the conflict, for consistency with the
+	  solver_iterator class.
+
+	* src/generic/aptitude_resolver_universe.cc:
+
 	  Fix handling of conflicts-through-provides.
 
 	* src/generic/aptitude_resolver_universe.cc:

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	Thu Aug 25 22:00:01 2005
@@ -311,7 +311,21 @@
       if(v.get_pkg() != const_cast<pkgCache::PrvIterator &>(prv).OwnerPkg())
 	return false;
       else
-	return v.get_ver() != const_cast<pkgCache::PrvIterator &>(prv).OwnerVer();
+	{
+	  // See whether the version provides this package.  We do
+	  // this instead of just checking whether it's the owner of
+	  // the provides in order to be consistent with the
+	  // solver_iterator, which screens out any version that
+	  // provides the target package name.  Of course, this means
+	  // generating duplicate deps, but that's a small cost
+	  // compared to narrowing the branching factor.
+	  for(pkgCache::PrvIterator p2 = v.get_ver().ProvidesList();
+	      !p2.end(); ++p2)
+	    if(p2.ParentPkg() == d.TargetPkg())
+	      return false;
+
+	  return true;
+	}
     }
 }
 



More information about the Aptitude-svn-commit mailing list