[Aptitude-devel] r3195 - in branches/aptitude-0.3/aptitude: . src/generic/problemresolver

Daniel Burrows dburrows@costa.debian.org
Sat, 30 Apr 2005 14:56:41 +0000


Author: dburrows
Date: Sat Apr 30 14:56:30 2005
New Revision: 3195

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
Log:
Actually use the forbid-dropping.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Sat Apr 30 14:56:30 2005
@@ -2,6 +2,10 @@
 
 	* src/generic/problemresolver/problemresolver.h:
 
+	  Actually drop attempts to install "forbidden" package versions.
+
+	* src/generic/problemresolver/problemresolver.h:
+
 	  Add basic support for maintaining a list of "forbidden" package
 	  versions that varies by solution.
 

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	Sat Apr 30 14:56:30 2005
@@ -684,6 +684,14 @@
 		   const version &v,
 		   const iter &forbidden_iter)
   {
+    if(s.get_forbidden_versions().find(v) != s.get_forbidden_versions().end())
+      {
+	if(debug)
+	  std::cout << "Discarding forbidden version " << v.get_name() << std::endl;
+
+	return false;
+      }
+
     version old_version=s.version_of(v.get_package());
 
     assert(old_version == v.get_package().current_version() &&