#
SET(LIBZYPP_MAJOR "4")
-SET(LIBZYPP_MINOR "16")
-SET(LIBZYPP_COMPATMINOR "14")
+SET(LIBZYPP_MINOR "17")
+SET(LIBZYPP_COMPATMINOR "17")
SET(LIBZYPP_PATCH "0")
{ return _pimpl->problems (); }
void Resolver::applySolutions( const ProblemSolutionList & solutions )
{ _pimpl->applySolutions (solutions); }
- void Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
- { _pimpl->doUpgrade(opt_stats_r); }
+ bool Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
+ { return _pimpl->doUpgrade(opt_stats_r); }
void Resolver::doUpdate()
{ _pimpl->doUpdate(); }
void Resolver::setForceResolve( const bool force )
* Quite helpful to get back to a 'sane state'. Quite disastrous
* since you'll loose all non-distribution packages
**/
- void doUpgrade( UpgradeStatistics & opt_stats_r );
+ bool doUpgrade( UpgradeStatistics & opt_stats_r );
/**
* Update to newest package
}
}
-bool
+void
Resolver::doUpdate()
{
- if (_satResolver) {
- return _satResolver->doUpdate();
- } else {
- ERR << "SAT solver has not been initialized." << endl;
- return false;
- }
+ return _satResolver->doUpdate();
}
void
// DESCRIPTION : Unmaintained packages which does not fit to
// the updated system (broken dependencies) will be
// deleted.
+// returns true if solving was successful
//
-void Resolver::checkUnmaintainedItems () {
+bool Resolver::checkUnmaintainedItems () {
int solverRuns = 1;
+ bool solverRet = resolvePool();
MIL << "Checking unmaintained items....." << endl;
- while (!resolvePool() && solverRuns++ < MAXSOLVERRUNS) {
+ while (!solverRet && solverRuns++ < MAXSOLVERRUNS) {
ResolverProblemList problemList = problems();
ProblemSolutionList solutionList;
PoolItemList problemItemList;
// break cause there is no other solution available by the next run
solverRuns = MAXSOLVERRUNS;
}
+ // next try
+ solverRet = resolvePool();
}
}
// Unmaintained packages which does not fit to the updated system
// (broken dependencies) will be deleted.
- void checkUnmaintainedItems ();
+ // returns true if solving was successful
+ bool checkUnmaintainedItems ();
void solverInit();
bool verifySystem ();
bool resolvePool();
bool resolveQueue(solver::detail::SolverQueueItemList & queue);
- bool doUpdate();
+ void doUpdate();
- void doUpgrade( zypp::UpgradeStatistics & opt_stats_r );
+ bool doUpgrade( zypp::UpgradeStatistics & opt_stats_r );
PoolItemList problematicUpdateItems( void ) const { return _problem_items; }
ResolverProblemList problems () const;
//
//
// METHOD NAME : Resolver::doUpgrade
-// METHOD TYPE : int
+// METHOD TYPE : bool
//
// DESCRIPTION : go through all installed (but not yet touched by user)
// packages and look for update candidates
//
-void
+bool
Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
{
typedef map<PoolItem,PoolItem> CandidateMap;
catch( const Exception & excpt_r) {
ERR << "Huh, no target ?";
ZYPP_CAUGHT(excpt_r);
- if (!_testing) return; // can't continue without target
+ if (!_testing) return false; // can't continue without target
MIL << "Running in test mode, continuing without target" << endl;
}
MIL << "target at " << target << endl;
// Unmaintained packages which does not fit to the updated system
// (broken dependencies) will be deleted.
- checkUnmaintainedItems ();
+ // Make a solverrun and return it to the calling function
+ return checkUnmaintainedItems ();
}
}
-bool SATResolver::doUpdate()
+void SATResolver::doUpdate()
{
MIL << "SATResolver::doUpdate()" << endl;
solverEnd();
MIL << "SATResolver::doUpdate() done" << endl;
- return true;
}
bool resolveQueue(const SolverQueueItemList &requestQueue,
const PoolItemList & weakItems);
// searching for new packages
- bool doUpdate();
+ void doUpdate();
ResolverProblemList problems ();
void applySolutions (const ProblemSolutionList &solutions);