#include "zypp/Resolver.h"
#include "zypp/ZConfig.h"
#include "zypp/TriBool.h"
-#include "zypp/UpgradeStatistics.h"
#include "zypp/solver/detail/Resolver.h"
#include "zypp/solver/detail/Testcase.h"
void Resolver::applySolutions( const ProblemSolutionList & solutions )
{ _pimpl->applySolutions (solutions); }
- bool Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
- { return _pimpl->doUpgrade(opt_stats_r); }
+ bool Resolver::doUpgrade()
+ { return _pimpl->doUpgrade(); }
void Resolver::doUpdate()
{ _pimpl->doUpdate(); }
/**
* Do an distribution upgrade
*
- * This will run a full upgrade on the pool, taking all upgrade
- * dependencies (provide/obsolete for package renames, split-
- * provides, etc.) into account and actually removing installed
- * packages if no upgrade exists AND the package dependency is
- * broken
- *
- * To be run with great caution. It basically brings your
- * system 'back to start'.
- * Quite helpful to get back to a 'sane state'. Quite disastrous
- * since you'll loose all non-distribution packages
+ * Perform a distribution upgrade. This performs an update of
+ * all packages with a special resolver algorithm which takes
+ * care of package splits, pattern and product updates,
+ * etc.
**/
- bool doUpgrade( UpgradeStatistics & opt_stats_r );
+ bool doUpgrade();
+ /** \deprecated The UpgradeStatistics argument is a meanwhile useless relict of pre-satsolver days. */
+ ZYPP_DEPRECATED bool doUpgrade( UpgradeStatistics & )
+ { return doUpgrade(); }
/**
* Update to newest package
#ifndef ZYPP_UPGRADESTATISTICS_H
#define ZYPP_UPGRADESTATISTICS_H
+#warning This include and the classes declared inside are depreceated.
#include <iosfwd>
#include <list>
#include <string>
+#include "zypp/base/Deprecated.h"
+
/////////////////////////////////////////////////////////////////////////
namespace zypp
{ ///////////////////////////////////////////////////////////////////////
/**
* @short Struct for update options
**/
-class UpgradeOptions {
+class ZYPP_DEPRECATED UpgradeOptions {
public:
// CLASS NAME : UpgradeStatistics
/**
* @short Struct for update options, statistics, and result lists.
+ *
+ * \deprecated
**/
-class UpgradeStatistics : public UpgradeOptions {
+class ZYPP_DEPRECATED UpgradeStatistics : public UpgradeOptions {
virtual std::ostream & dumpOn( std::ostream & str ) const;
friend std::ostream & operator<<( std::ostream & str, const UpgradeStatistics & obj )
#include "zypp/ProblemTypes.h"
#include "zypp/ResolverProblem.h"
#include "zypp/ProblemSolution.h"
-#include "zypp/UpgradeStatistics.h"
#include "zypp/Capabilities.h"
#include "zypp/Capability.h"
class SATResolver;
-
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : ItemCapKind
ResPool _pool;
SATResolver *_satResolver;
SerialNumberWatcher _poolchanged;
- bool _testing;
CapabilitySet _extra_requires;
CapabilitySet _extra_conflicts;
bool resolveQueue( SolverQueueItemList & queue );
void doUpdate();
- bool doUpgrade( zypp::UpgradeStatistics & opt_stats_r );
+ bool doUpgrade();
PoolItemList problematicUpdateItems() const;
/** \name Solver flags */
// and set the SAT solver in update mode
//
bool
-Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
+Resolver::doUpgrade()
{
Target_Ptr target( getZYpp()->getTarget() );
if ( ! target )
{
ERR << "Huh, no target ?" << endl;
- if (!_testing)
- return false; // can't continue without target
- MIL << "Running in test mode, continuing without target" << endl;
- }
- MIL << "target at " << target << endl;
-
- MIL << "doUpgrade start... "
- << "(silent_downgrades:" << (opt_stats_r.silent_downgrades?"yes":"no") << ")"
- << endl;
+ return false; // can't continue without target
+ }
// create a testcase for the updating system
- PathInfo path ("/mnt/var/log"); // checking if update has been started from instsys
std::string now( Date::now().form( "-%Y-%m-%d-%H-%M-%S" ) );
- if ( !path.isExist() ) {
- Testcase testcase("/var/log/updateTestcase"+now);
- testcase.createTestcase (*this, true, false); // create pool, do not solve
- } else {
- Testcase testcase("/mnt/var/log/updateTestcase"+now);
- testcase.createTestcase (*this, true, false); // create pool, do not solve
- }
-
- {
- UpgradeOptions opts( opt_stats_r );
- opt_stats_r = UpgradeStatistics();
- (UpgradeOptions&)opt_stats_r = opts;
- }
+ Pathname path ( target->assertRootPrefix("/var/log/updateTestcase"+now) );
+ Testcase testcase( path.asString() );
+ testcase.createTestcase (*this, true, false); // create pool, do not solve
// Setting Resolver to upgrade mode. SAT solver will do the update
_upgradeMode = true;