Author: schubi2 Date: Thu Nov 29 18:33:37 2007 New Revision: 7981 URL: http://svn.opensuse.org/viewcvs/zypp?rev=7981&view=rev Log: errormessage enabled for SAT solver Modified: trunk/libzypp/zypp/sat/SATResolver.cc trunk/libzypp/zypp/solver/detail/Resolver.cc trunk/libzypp/zypp/solver/detail/Resolver.h trunk/libzypp/zypp/solver/detail/Resolver_problems.cc Modified: trunk/libzypp/zypp/sat/SATResolver.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/SATResolver.cc?rev=7981&r1=7980&r2=7981&view=diff ============================================================================== --- trunk/libzypp/zypp/sat/SATResolver.cc (original) +++ trunk/libzypp/zypp/sat/SATResolver.cc Thu Nov 29 18:33:37 2007 @@ -411,6 +411,11 @@ // copying solution back to zypp pool //----------------------------------------- + if (solv->problems.count > 0 ) + { + ERR << "Solverrun finished with an ERROR" << endl; + return false; + } /* solvables to be erased */ for (int i = solv->installed->start; i < solv->installed->start + solv->installed->nsolvables; i++) { Modified: trunk/libzypp/zypp/solver/detail/Resolver.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Resolver.cc?rev=7981&r1=7980&r2=7981&view=diff ============================================================================== --- trunk/libzypp/zypp/solver/detail/Resolver.cc (original) +++ trunk/libzypp/zypp/solver/detail/Resolver.cc Thu Nov 29 18:33:37 2007 @@ -110,6 +110,7 @@ Resolver::Resolver (const ResPool & pool) : _pool (pool) + , _satResolver (NULL) , _poolchanged( _pool.serial() ) , _timeout_seconds (0) , _maxSolverPasses (0) @@ -1284,11 +1285,14 @@ { // Solving with the satsolver - if ( getenv("ZYPP_SAT_SOLVER") ) { - MIL << "-------------- Calling SAT Solver -------------------" << endl; - // syncing with sat pool - sat::Pool satPool( sat::Pool::instance() ); - _pool.satSync(); + if ( getenv("ZYPP_SAT_SOLVER")) { + MIL << "-------------- Calling SAT Solver -------------------" << endl; + if ( !_satResolver ) { + // syncing with sat pool + sat::Pool satPool( sat::Pool::instance() ); + _pool.satSync(); + _satResolver = new SATResolver(_pool, satPool.get()); + } #if 0 MIL << "------SAT-Pool------" << endl; for (sat::Pool::SolvableIterator i = satPool.solvablesBegin(); @@ -1297,9 +1301,7 @@ } MIL << "------SAT-Pool end------" << endl; #endif - - SATResolver satResolver(_pool, satPool.get()); - return satResolver.resolvePool(); + return _satResolver->resolvePool(); } ResolverContext_Ptr saveContext = _best_context; Modified: trunk/libzypp/zypp/solver/detail/Resolver.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Resolver.h?rev=7981&r1=7980&r2=7981&view=diff ============================================================================== --- trunk/libzypp/zypp/solver/detail/Resolver.h (original) +++ trunk/libzypp/zypp/solver/detail/Resolver.h Thu Nov 29 18:33:37 2007 @@ -42,7 +42,6 @@ #include "zypp/ResolverProblem.h" #include "zypp/ProblemSolution.h" #include "zypp/UpgradeStatistics.h" - #include "zypp/CapSet.h" @@ -56,6 +55,10 @@ namespace detail { /////////////////////////////////////////////////////////////////// + class SATResolver; + + + /////////////////////////////////////////////////////////////////// // // CLASS NAME : ItemCapKind @@ -89,6 +92,7 @@ private: ResPool _pool; + SATResolver *_satResolver; SerialNumberWatcher _poolchanged; unsigned _timeout_seconds; Modified: trunk/libzypp/zypp/solver/detail/Resolver_problems.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Resolver_problems.cc?rev=7981&r1=7980&r2=7981&view=diff ============================================================================== --- trunk/libzypp/zypp/solver/detail/Resolver_problems.cc (original) +++ trunk/libzypp/zypp/solver/detail/Resolver_problems.cc Thu Nov 29 18:33:37 2007 @@ -42,6 +42,7 @@ #include "zypp/solver/detail/ResolverInfoMissingReq.h" #include "zypp/solver/detail/ResolverInfoNeededBy.h" #include "zypp/solver/detail/ResolverInfoObsoletes.h" +#include "zypp/sat/SATResolver.h" #include "zypp/base/String.h" #include "zypp/base/Logger.h" @@ -345,6 +346,9 @@ ResolverProblemList Resolver::problems (const bool ignoreValidSolution) const { + if ( getenv("ZYPP_SAT_SOLVER") && _satResolver ) + return _satResolver->problems(); + ResolverProblemList problems; MIL << "Resolver::problems(" << (ignoreValidSolution ? "ignoreValidSolution": "") << ")" << endl; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org