- iterators for solver decisions
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Fri, 26 Oct 2007 13:57:24 +0000 (13:57 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Fri, 26 Oct 2007 13:57:24 +0000 (13:57 +0000)
examples/ruby/basic.rb
src/CMakeLists.txt
src/pool.h

index baf807e..37a9d0a 100644 (file)
@@ -18,14 +18,14 @@ pool.each_source do |repo|
 end
 
 s.each_solvable do |r|
-  puts "#{r.name}"
+  puts r
 end
 
 q = Queue.new
 puts q.empty?
 
-r = pool.select_solvable(s, 'gnome-desktop')
-puts r.name
+r = pool.select_solvable(s, 'G')
+puts r
 
 # push one command and one resolvable to the queue
 q.push(SOLVER_INSTALL_SOLVABLE)
@@ -46,4 +46,12 @@ solv.noupdateprovide = 0
 # solve the queue
 solv.solve(q)
 
-solv.print_decisions
\ No newline at end of file
+#solv.print_decisions
+
+solv.each_to_install do |i|
+  puts "to install #{i}"
+end
+
+solv.each_to_remove do |i|
+  puts "to remove #{i}"
+end
\ No newline at end of file
index 2605bdd..e145370 100644 (file)
@@ -4,5 +4,5 @@ evr.c pool.c queue.c   source.c  util.c)
 
 ADD_LIBRARY(satsolver STATIC ${libsatsolver_SRCS})
 
-SET(libsatsolver_HEADERS bitmap.h evr.h hash.h poolarch.h pool.h poolid.h pooltypes.h queue.h solvable.h solver.h source.h source_solv.h util.h )
-INSTALL(  FILES ${libsatsolver_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/satsolver" )
+#SET(libsatsolver_HEADERS bitmap.h evr.h hash.h poolarch.h pool.h poolid.h pooltypes.h queue.h solvable.h solver.h source.h source_solv.h util.h )
+#INSTALL(  FILES ${libsatsolver_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/satsolver" )
index 433ac76..0f97b7c 100644 (file)
@@ -134,9 +134,21 @@ struct _Pool {
 #define REL_WITH       18
 #define REL_NAMESPACE  19
 
+/**
+ * Creates a new pool
+ */
 extern Pool *pool_create(void);
+/**
+ * Delete a pool
+ */
 extern void pool_free(Pool *pool);
+/**
+ * ????
+ */
 extern void pool_freesource(Pool *pool, Source *source);
+/**
+ * Prepares a pool for solving
+ */
 extern void pool_prepare(Pool *pool);
 extern void pool_freewhatprovides(Pool *pool);
 extern Id pool_queuetowhatprovides(Pool *pool, Queue *q);