some bugfixes, loggings
authorStefan Schubert <schubi@suse.de>
Wed, 28 Nov 2007 16:36:28 +0000 (16:36 +0000)
committerStefan Schubert <schubi@suse.de>
Wed, 28 Nov 2007 16:36:28 +0000 (16:36 +0000)
zypp/sat/SATResolver.cc
zypp/solver/detail/Resolver.cc

index 27067a6..e41de4b 100644 (file)
@@ -382,16 +382,14 @@ SATResolver::resolvePool()
        if (id == ID_NULL) {
            ERR << "Install: " << *iter << " not found" << endl;
        }
+       MIL << "Install " << *iter << " with the SAT-Pool ID: " << id << endl;
        queue_push( &(jobQueue), SOLVER_INSTALL_SOLVABLE );
         queue_push( &(jobQueue), id );
     }
 
     for (PoolItemList::const_iterator iter = _items_to_remove.begin(); iter != _items_to_remove.end(); iter++) {
-       string packageName = str::form (_("%s:%s"),
-                                       iter->resolvable()->kind().asString().c_str(),
-                                       iter->resolvable()->name().c_str()
-                                       );
-       Id id = str2id( _SATPool, packageName.c_str(), 1 );
+       Id id = iter->satSolvable().id(); 
+       MIL << "Delete " << *iter << " with the SAT-Pool ID: " << id << endl;   
        queue_push( &(jobQueue), SOLVER_ERASE_SOLVABLE_NAME );
        queue_push( &(jobQueue), id);
     }
@@ -416,8 +414,10 @@ SATResolver::resolvePool()
     _SATPool->verbose = true;
 
     // Solve !
+    MIL << "Starting solving...." << endl;
     solver_solve( solv, &(jobQueue) );
-
+    MIL << "....Solver end" << endl;
+    
     // copying solution back to zypp pool
     //-----------------------------------------
     Id p;
index 99ec099..af17ae2 100644 (file)
@@ -18,6 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  * 02111-1307, USA.
  */
+#include <boost/static_assert.hpp>
 
 #include "zypp/solver/detail/Resolver.h"
 #include "zypp/solver/detail/Helper.h"
@@ -26,7 +27,6 @@
 #include "zypp/base/Logger.h"
 #include "zypp/base/String.h"
 #include "zypp/base/Gettext.h"
-
 #include "zypp/base/Algorithm.h"
 #include "zypp/ResPool.h"
 #include "zypp/ResFilters.h"
@@ -36,9 +36,9 @@
 #include "zypp/solver/detail/ResolverInfoNeededBy.h"
 #include "zypp/capability/FilesystemCap.h"
 #include "zypp/sat/Pool.h"
+#include "zypp/sat/Solvable.h"
 #include "zypp/sat/SATResolver.h"
 
-
 /////////////////////////////////////////////////////////////////////////
 namespace zypp
 { ///////////////////////////////////////////////////////////////////////
@@ -1289,6 +1289,12 @@ Resolver::resolvePool( bool tryAllPossibilities )
        // syncing with sat pool
        sat::Pool satPool( sat::Pool::instance() );
        _pool.satSync();
+       MIL << "------SAT-Pool------" << endl;
+       for (sat::Pool::SolvableIterator i = satPool.solvablesBegin();
+            i != satPool.solvablesEnd(); i++ ) {
+           MIL << *i << " ID: " << i->id() << endl;
+       }
+       MIL << "------SAT-Pool end------" << endl;      
        
        SATResolver satResolver(_pool, satPool.get());
        return satResolver.resolvePool();