[zypp-commit] r9886 - in /trunk/libzypp: ./ zypp/ zypp/solver/detail/
Author: schubi2
Date: Tue Apr 29 16:37:09 2008
New Revision: 9886
URL: http://svn.opensuse.org/viewcvs/zypp?rev=9886&view=rev
Log:
cleanup in return values of doUpgrade and doUpdate
Modified:
trunk/libzypp/VERSION.cmake
trunk/libzypp/zypp/Resolver.cc
trunk/libzypp/zypp/Resolver.h
trunk/libzypp/zypp/solver/detail/Resolver.cc
trunk/libzypp/zypp/solver/detail/Resolver.h
trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc
trunk/libzypp/zypp/solver/detail/SATResolver.cc
trunk/libzypp/zypp/solver/detail/SATResolver.h
Modified: trunk/libzypp/VERSION.cmake
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=9886&r1=9885&r2=9886&view=diff
==============================================================================
--- trunk/libzypp/VERSION.cmake (original)
+++ trunk/libzypp/VERSION.cmake Tue Apr 29 16:37:09 2008
@@ -45,6 +45,6 @@
#
SET(LIBZYPP_MAJOR "4")
-SET(LIBZYPP_MINOR "16")
-SET(LIBZYPP_COMPATMINOR "14")
+SET(LIBZYPP_MINOR "17")
+SET(LIBZYPP_COMPATMINOR "17")
SET(LIBZYPP_PATCH "0")
Modified: trunk/libzypp/zypp/Resolver.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Resolver.cc?rev=9886&r1=9885&r2=9886&view=diff
==============================================================================
--- trunk/libzypp/zypp/Resolver.cc (original)
+++ trunk/libzypp/zypp/Resolver.cc Tue Apr 29 16:37:09 2008
@@ -72,8 +72,8 @@
{ 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 )
Modified: trunk/libzypp/zypp/Resolver.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Resolver.h?rev=9886&r1=9885&r2=9886&view=diff
==============================================================================
--- trunk/libzypp/zypp/Resolver.h (original)
+++ trunk/libzypp/zypp/Resolver.h Tue Apr 29 16:37:09 2008
@@ -111,7 +111,7 @@
* 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
Modified: trunk/libzypp/zypp/solver/detail/Resolver.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Resolver.cc?rev=9886&r1=9885&r2=9886&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/Resolver.cc (original)
+++ trunk/libzypp/zypp/solver/detail/Resolver.cc Tue Apr 29 16:37:09 2008
@@ -103,15 +103,10 @@
}
}
-bool
+void
Resolver::doUpdate()
{
- if (_satResolver) {
- return _satResolver->doUpdate();
- } else {
- ERR << "SAT solver has not been initialized." << endl;
- return false;
- }
+ return _satResolver->doUpdate();
}
void
@@ -281,12 +276,14 @@
// 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;
@@ -344,6 +341,8 @@
// break cause there is no other solution available by the next run
solverRuns = MAXSOLVERRUNS;
}
+ // next try
+ solverRet = resolvePool();
}
}
Modified: trunk/libzypp/zypp/solver/detail/Resolver.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Resolver.h?rev=9886&r1=9885&r2=9886&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/Resolver.h (original)
+++ trunk/libzypp/zypp/solver/detail/Resolver.h Tue Apr 29 16:37:09 2008
@@ -97,7 +97,8 @@
// 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();
@@ -137,9 +138,9 @@
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;
Modified: trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc?rev=9886&r1=9885&r2=9886&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc (original)
+++ trunk/libzypp/zypp/solver/detail/ResolverUpgrade.cc Tue Apr 29 16:37:09 2008
@@ -200,12 +200,12 @@
//
//
// 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
participants (1)
-
schubi2@svn.opensuse.org