// 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++)
{
Resolver::Resolver (const ResPool & pool)
: _pool (pool)
+ , _satResolver (NULL)
, _poolchanged( _pool.serial() )
, _timeout_seconds (0)
, _maxSolverPasses (0)
{
// 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();
}
MIL << "------SAT-Pool end------" << endl;
#endif
-
- SATResolver satResolver(_pool, satPool.get());
- return satResolver.resolvePool();
+ return _satResolver->resolvePool();
}
ResolverContext_Ptr saveContext = _best_context;
#include "zypp/ResolverProblem.h"
#include "zypp/ProblemSolution.h"
#include "zypp/UpgradeStatistics.h"
-
#include "zypp/CapSet.h"
namespace detail
{ ///////////////////////////////////////////////////////////////////
+ class SATResolver;
+
+
+
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : ItemCapKind
private:
ResPool _pool;
+ SATResolver *_satResolver;
SerialNumberWatcher _poolchanged;
unsigned _timeout_seconds;
#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"
ResolverProblemList
Resolver::problems (const bool ignoreValidSolution) const
{
+ if ( getenv("ZYPP_SAT_SOLVER") && _satResolver )
+ return _satResolver->problems();
+
ResolverProblemList problems;
MIL << "Resolver::problems(" << (ignoreValidSolution ? "ignoreValidSolution": "") << ")" << endl;