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

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


Author: dburrows
Date: Sat Apr  9 14:41:42 2005
New Revision: 2959

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/problemresolver/aptitude_resolver.h
Log:
Fix missing bits.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Sat Apr  9 14:41:42 2005
@@ -2,6 +2,11 @@
 
 	* src/generic/problemresolver/aptitude_resolver.h:
 
+	  Fix some more missing stuff that turned up while trying to use
+	  the aptitude resolver.
+
+	* src/generic/problemresolver/aptitude_resolver.h:
+
 	  Add a preliminary APT-based resolver universe (totally untested, but it
 	  sort of compiles).
 

Modified: branches/aptitude-0.3/aptitude/src/generic/problemresolver/aptitude_resolver.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/problemresolver/aptitude_resolver.h	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/problemresolver/aptitude_resolver.h	Sat Apr  9 14:41:42 2005
@@ -55,6 +55,11 @@
     return pkg->ID;
   }
 
+  const char *get_name() const
+  {
+    return pkg.Name();
+  }
+
   bool operator==(const aptitude_resolver_package &other) const
   {
     return pkg==other.pkg;
@@ -103,6 +108,19 @@
       return (*apt_cache_file)->Head().PackageCount+pkg->ID;
   }
 
+  const char *get_name() const
+  {
+    if(!ver.end())
+      return ver.VerStr();
+    else
+      return "[UNINST]";
+  }
+
+  aptitude_resolver_package get_package() const
+  {
+    return pkg;
+  }
+
   bool operator==(const aptitude_resolver_version &other) const
   {
     return pkg == other.pkg && ver == other.ver;
@@ -617,12 +635,12 @@
     }
   };
 
-  package_iterator packages_begin()
+  package_iterator packages_begin() const
   {
     return (*apt_cache_file)->PkgBegin();
   }
 
-  dep_iterator deps_begin()
+  dep_iterator deps_begin() const
   {
     return (*apt_cache_file)->PkgBegin();
   }