using namespace solver;
IMPL_PTR_TYPE(Resolver);
-#if 0
- Resolver_Ptr Resolver::_resolver = NULL;
- Resolver_Ptr Resolver::resolver()
- {
- if (_resolver == NULL) {
- _resolver = new Resolver();
- }
- return _resolver;
- }
-#endif
+
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : Resolver::Resolver
///////////////////////////////////////////////////////////////////
bool Resolver::verifySystem ()
{ return _pimpl->verifySystem(); }
+
bool Resolver::resolvePool ()
{ return _pimpl->resolvePool(); }
- bool Resolver::resolveQueue (zypp::solver::detail::SolverQueueItemList & queue)
+
+ bool Resolver::resolveQueue( solver::detail::SolverQueueItemList & queue )
{ return _pimpl->resolveQueue(queue); }
+
void Resolver::undo()
{ _pimpl->undo(); }
+
ResolverProblemList Resolver::problems ()
{ return _pimpl->problems (); }
+
void Resolver::applySolutions( const ProblemSolutionList & solutions )
{ _pimpl->applySolutions (solutions); }
+
bool Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
{ return _pimpl->doUpgrade(opt_stats_r); }
+
void Resolver::doUpdate()
{ _pimpl->doUpdate(); }
- void Resolver::setForceResolve( const bool force )
- { _pimpl->setForceResolve( force ); }
- bool Resolver::forceResolve()
- { return _pimpl->forceResolve(); }
- void Resolver::setIgnoreAlreadyRecommended
- (const bool ignoreAlreadyRecommended)
- { _pimpl->setIgnorealreadyrecommended (ignoreAlreadyRecommended); }
- bool Resolver::ignoreAlreadyRecommended()
- { return _pimpl->ignorealreadyrecommended(); }
- void Resolver::setOnlyRequires( const bool onlyRequires )
- { onlyRequires ? _pimpl->setOnlyRequires( true ) : _pimpl->setOnlyRequires( false ); }
- void Resolver::resetOnlyRequires()
- { _pimpl->setOnlyRequires( indeterminate ); }
- bool Resolver::onlyRequires()
- {
- if (indeterminate(_pimpl->onlyRequires()))
- return ZConfig::instance().solver_onlyRequires();
- else
- return _pimpl->onlyRequires();
- }
+
+ void Resolver::setForceResolve( bool yesno_r ) { _pimpl->setForceResolve( yesno_r ); }
+ bool Resolver::forceResolve() { return _pimpl->forceResolve(); }
+
+ void Resolver::setIgnoreAlreadyRecommended( bool yesno_r) { _pimpl->setIgnoreAlreadyRecommended( yesno_r ); }
+ bool Resolver::ignoreAlreadyRecommended() { return _pimpl->ignoreAlreadyRecommended(); }
+
+ void Resolver::setOnlyRequires( bool yesno_r ) { _pimpl->setOnlyRequires( yesno_r ); }
+ void Resolver::resetOnlyRequires() { _pimpl->setOnlyRequires( indeterminate ); }
+ bool Resolver::onlyRequires() { return _pimpl->onlyRequires(); }
+
+ void Resolver::setAllowVendorChange( bool yesno_r ) { _pimpl->setAllowVendorChange( yesno_r ); }
+ void Resolver::setDefaultAllowVendorChange() { _pimpl->setAllowVendorChange( indeterminate ); }
+ bool Resolver::allowVendorChange() const { return _pimpl->allowVendorChange(); }
void Resolver::setSystemVerification( bool yesno_r ) { _pimpl->setVerifyingMode( yesno_r ); }
- void Resolver::setDefaultSystemVerification() { _pimpl->setVerifyingMode(indeterminate ); }
+ void Resolver::setDefaultSystemVerification() { _pimpl->setVerifyingMode( indeterminate ); }
bool Resolver::systemVerification() const { return _pimpl->isVerifyingMode(); }
void Resolver::setSolveSrcPackages( bool yesno_r ) { _pimpl->setSolveSrcPackages( yesno_r ); }
- void Resolver::setDefaultSolveSrcPackages() { _pimpl->setSolveSrcPackages(indeterminate ); }
+ void Resolver::setDefaultSolveSrcPackages() { _pimpl->setSolveSrcPackages( indeterminate ); }
bool Resolver::solveSrcPackages() const { return _pimpl->solveSrcPackages(); }
- void Resolver::addRequire (const Capability & capability)
- { _pimpl->addExtraRequire( capability ); }
- void Resolver::addConflict (const Capability & capability)
- { _pimpl->addExtraConflict( capability ); }
- void Resolver::removeRequire (const Capability & capability)
- { _pimpl->removeExtraRequire( capability ); }
- void Resolver::removeConflict (const Capability & capability)
- { _pimpl->removeExtraConflict( capability ); }
- const CapabilitySet Resolver::getRequire ()
- { return _pimpl->extraRequires();}
- const CapabilitySet Resolver::getConflict ()
- { return _pimpl->extraConflicts();}
- std::list<PoolItem> Resolver::problematicUpdateItems( void ) const
+
+ void Resolver::addRequire( const Capability & capability ) { _pimpl->addExtraRequire( capability ); }
+ void Resolver::addConflict( const Capability & capability ) { _pimpl->addExtraConflict( capability ); }
+ void Resolver::removeRequire( const Capability & capability ) { _pimpl->removeExtraRequire( capability ); }
+ void Resolver::removeConflict( const Capability & capability ){ _pimpl->removeExtraConflict( capability ); }
+
+ CapabilitySet Resolver::getRequire() { return _pimpl->extraRequires(); }
+ CapabilitySet Resolver::getConflict() { return _pimpl->extraConflicts(); }
+
+ std::list<PoolItem> Resolver::problematicUpdateItems() const
{ return _pimpl->problematicUpdateItems(); }
- bool Resolver::createSolverTestcase (const std::string & dumpPath)
- { solver::detail::Testcase testcase (dumpPath);
- return testcase.createTestcase(*_pimpl);}
- const solver::detail::ItemCapKindList Resolver::isInstalledBy (const PoolItem item)
+
+ bool Resolver::createSolverTestcase( const std::string & dumpPath )
+ {
+ solver::detail::Testcase testcase (dumpPath);
+ return testcase.createTestcase(*_pimpl);
+ }
+
+ solver::detail::ItemCapKindList Resolver::isInstalledBy( const PoolItem & item )
{ return _pimpl->isInstalledBy (item); }
- const solver::detail::ItemCapKindList Resolver::installs (const PoolItem item)
+
+ solver::detail::ItemCapKindList Resolver::installs( const PoolItem & item )
{ return _pimpl->installs (item); }
- const solver::detail::ItemCapKindList Resolver::satifiedByInstalled (const PoolItem item)
+
+ solver::detail::ItemCapKindList Resolver::satifiedByInstalled( const PoolItem & item )
{ return _pimpl->satifiedByInstalled (item); }
- const solver::detail::ItemCapKindList Resolver::installedSatisfied (const PoolItem item)
+
+ solver::detail::ItemCapKindList Resolver::installedSatisfied( const PoolItem & item )
{ return _pimpl->installedSatisfied (item); }
- void Resolver::reset ()
+
+ void Resolver::reset()
{ _pimpl->reset( false ); /* Do not keep extra requires/conflicts */ }
*
* Call \ref setSystemVerification to turn of this mode.
**/
- bool verifySystem ();
+ bool verifySystem();
/**
* the latter case, use problems() and later applySolutions()
* below.
**/
- bool resolvePool (void);
+ bool resolvePool();
/**
* to e.g. the selectables.
*
**/
- bool resolveQueue (solver::detail::SolverQueueItemList & queue);
+ bool resolveQueue( solver::detail::SolverQueueItemList & queue );
/*
* Undo solver changes done in resolvePool()
* Throwing away all ignored dependencies.
*/
- void undo( void );
+ void undo();
/*
* Resets solver information and verify option.
*/
- void reset( void );
+ void reset();
/**
* Return the list of deleted items.
* Note : This list is valid after the call doUpgrade() only.
**/
- std::list<PoolItem> problematicUpdateItems( void ) const;
+ std::list<PoolItem> problematicUpdateItems() const;
/**
* Return the dependency problems found by the last call to
* have unfulfilled requirements.
* This behaviour is favourited by ZMD.
**/
- void setForceResolve (const bool force);
+ void setForceResolve( bool force );
bool forceResolve();
/**
* Ignore recommended packages that were already recommended by
* the installed packages
**/
- void setIgnoreAlreadyRecommended (const bool ignoreAlreadyRecommended);
+ void setIgnoreAlreadyRecommended( bool yesno_r );
bool ignoreAlreadyRecommended();
/**
* So recommended packages, language packages and packages which depend
* on hardware (modalias) will not be regarded.
**/
- void setOnlyRequires (const bool onlyRequires);
+ void setOnlyRequires( bool yesno_r );
void resetOnlyRequires(); // set back to default (described in zypp.conf)
bool onlyRequires();
/**
+ * Setting whether the solver should allow or disallow vendor changes.
+ *
+ * If OFF (the default) the solver will replace packages with packages
+ * of the same (or equivalent) vendor ony.
+ *
+ * \see \ref VendorAttr for definition of vendor equivalence.
+ **/
+ void setAllowVendorChange( bool yesno_r );
+ void setDefaultAllowVendorChange(); // set back to default (in zypp.conf)
+ bool allowVendorChange() const;
+
+ /**
* System verification mode also monitors and repairs dependencies
* of already installed packages.
* \see \ref verifySystem
* Adding additional requirement
*
*/
- void addRequire (const Capability & capability);
+ void addRequire( const Capability & capability );
/**
* Adding additional conflict
*
*/
- void addConflict (const Capability & capability);
+ void addConflict( const Capability & capability );
/**
* Remove the additional requirement set by \ref addRequire(Capability).
*
*/
- void removeRequire (const Capability & capability);
+ void removeRequire( const Capability & capability );
/**
* Remove the additional conflict set by \ref addConflict(Capability).
*
*/
- void removeConflict (const Capability & capability);
+ void removeConflict( const Capability & capability );
/**
* Get all the additional requirements set by \ref addRequire(Capability).
*
*/
- const CapabilitySet getRequire ();
+ CapabilitySet getRequire();
/**
* Get all the additional conflicts set by \ref addConflict(Capability).
*
*/
- const CapabilitySet getConflict();
+ CapabilitySet getConflict();
/**
* Generates a solver Testcase of the current state
* \parame dumpPath destination directory of the created directory
* \return true if it was successful
*/
- bool createSolverTestcase (const std::string & dumpPath = "/var/log/YaST2/solverTestcase");
+ bool createSolverTestcase( const std::string & dumpPath = "/var/log/YaST2/solverTestcase" );
/**
* Gives information about WHO has pused an installation of an given item.
* Note: In order to have a result start a solver run before. Not matter if it is valid or invalid.
*
*/
- const solver::detail::ItemCapKindList isInstalledBy (const PoolItem item);
+ solver::detail::ItemCapKindList isInstalledBy( const PoolItem & item );
/**
* Gives information about WHICH additional items will be installed due the installation of an item.
* Note: In order to have a result start a solver run before. Not matter if it is valid or invalid.
*
*/
- const solver::detail::ItemCapKindList installs (const PoolItem item);
+ solver::detail::ItemCapKindList installs( const PoolItem & item );
/**
* Gives information about WHICH installed items are requested by the installation of an item.
* initialInstallation This item has triggered the installation
* Not already fullfilled requierement only.
* cap Capability which has triggerd this installation
- * capKind Kind of that capability (e.g. Dep::REQUIRES,Dep::RECOMMENDS,... )
+ * capKind Kind of that capability (e.g. Dep::REQUIRES,Dep::RECOMMENDS,... )
*
* Note: In order to have a result start a solver run before. Not matter if it is valid or invalid.
*
*/
- const solver::detail::ItemCapKindList satifiedByInstalled(const PoolItem item);
+ solver::detail::ItemCapKindList satifiedByInstalled( const PoolItem & item );
/**
* initialInstallation This item has triggered the installation
* Not already fullfilled requierement only.
* cap Capability which has triggerd this installation
- * capKind Kind of that capability (e.g. Dep::REQUIRES,Dep::RECOMMENDS,... )
+ * capKind Kind of that capability (e.g. Dep::REQUIRES,Dep::RECOMMENDS,... )
*
* Note: In order to have a result start a solver run before. Not matter if it is valid or invalid.
*
*/
- const solver::detail::ItemCapKindList installedSatisfied(const PoolItem item);
+ solver::detail::ItemCapKindList installedSatisfied( const PoolItem & item );
#include <string>
#include <vector>
-#include "zypp/base/NonCopyable.h"
#include "zypp/PathInfo.h"
#include "zypp/Vendor.h"
*
* Per default vendor strings starting with \c "suse' or \c 'opensuse"
* are treated equivalent. This may be changed by providing customized
- * vendor description files in /etc/zypp/vendors.d.
- *
- * \todo remove superfluous base::NonCopyable
+ * vendor description files in \c /etc/zypp/vendors.d.
*/
-class VendorAttr : private base::NonCopyable
+class VendorAttr
{
public:
typedef std::vector<std::string> VendorList;
//---------------------------------------------------------------------------
-std::ostream &
-Resolver::dumpOn( std::ostream & os ) const
+std::ostream & Resolver::dumpOn( std::ostream & os ) const
{
return os << "<resolver/>";
}
: _pool(pool)
, _satResolver(NULL)
, _poolchanged(_pool.serial() )
- , _testing(false)
- , _forceResolve(false)
- , _upgradeMode(false)
- , _updateMode(false)
- , _verifying(false)
- , _onlyRequires(indeterminate)
- , _solveSrcPackages( false )
- , _ignorealreadyrecommended(false)
+ , _forceResolve (false)
+ , _upgradeMode (false)
+ , _updateMode (false)
+ , _verifying (false)
+ , _onlyRequires ( ZConfig::instance().solver_onlyRequires() )
+ , _allowVendorChange ( ZConfig::instance().solver_allowVendorChange() )
+ , _solveSrcPackages ( false )
+ , _ignoreAlreadyRecommended (false)
{
sat::Pool satPool( sat::Pool::instance() );
//---------------------------------------------------------------------------
-ResPool
-Resolver::pool (void) const
+void Resolver::setAllowVendorChange( TriBool state_r )
{
- return _pool;
+ _allowVendorChange = indeterminate(state_r) ? ZConfig::instance().solver_allowVendorChange() : bool(state_r);
}
-void
-Resolver::reset (bool keepExtras )
+void Resolver::setOnlyRequires( TriBool state_r )
+{
+ _onlyRequires = indeterminate(state_r) ? ZConfig::instance().solver_onlyRequires() : bool(state_r);
+}
+
+//---------------------------------------------------------------------------
+
+ResPool Resolver::pool() const
+{ return _pool; }
+
+void Resolver::reset( bool keepExtras )
{
_verifying = false;
_installedSatisfied.clear();
}
-void
-Resolver::doUpdate()
+void Resolver::doUpdate()
{
_updateMode = true;
return _satResolver->doUpdate();
PoolItemList Resolver::problematicUpdateItems() const
{ return _satResolver->problematicUpdateItems(); }
-void
-Resolver::addExtraRequire (const Capability & capability)
-{
- _extra_requires.insert (capability);
-}
+void Resolver::addExtraRequire( const Capability & capability )
+{ _extra_requires.insert (capability); }
-void
-Resolver::removeExtraRequire (const Capability & capability)
-{
- _extra_requires.erase (capability);
-}
+void Resolver::removeExtraRequire( const Capability & capability )
+{ _extra_requires.erase (capability); }
-void
-Resolver::addExtraConflict (const Capability & capability)
-{
- _extra_conflicts.insert (capability);
-}
+void Resolver::addExtraConflict( const Capability & capability )
+{ _extra_conflicts.insert (capability); }
-void
-Resolver::removeExtraConflict (const Capability & capability)
-{
- _extra_conflicts.erase (capability);
-}
+void Resolver::removeExtraConflict( const Capability & capability )
+{ _extra_conflicts.erase (capability); }
-void Resolver::removeQueueItem (const SolverQueueItem_Ptr item)
+void Resolver::removeQueueItem( SolverQueueItem_Ptr item )
{
bool found = false;
for (SolverQueueItemList::const_iterator iter = _added_queue_items.begin();
_removed_queue_items.unique ();
}
}
-void Resolver::addQueueItem (const SolverQueueItem_Ptr item)
+
+void Resolver::addQueueItem( SolverQueueItem_Ptr item )
{
bool found = false;
for (SolverQueueItemList::const_iterator iter = _removed_queue_items.begin();
}
}
-void
-Resolver::addWeak (const PoolItem item)
-{
- _addWeak.push_back (item);
-}
+void Resolver::addWeak( const PoolItem & item )
+{ _addWeak.push_back( item ); }
//---------------------------------------------------------------------------
};
-bool
-Resolver::verifySystem ()
+bool Resolver::verifySystem()
{
UndoTransact resetting (ResStatus::APPL_HIGH);
//----------------------------------------------------------------------------
// undo
-void
-Resolver::undo(void)
+void Resolver::undo()
{
UndoTransact info(ResStatus::APPL_LOW);
MIL << "*** undo ***" << endl;
return;
}
-void
-Resolver::solverInit()
+void Resolver::solverInit()
{
// Solving with the satsolver
static bool poolDumped = false;
}
}
- _satResolver->setFixsystem(false);
- _satResolver->setIgnorealreadyrecommended(false);
- _satResolver->setAllowdowngrade(false);
- _satResolver->setAllowarchchange(false);
- _satResolver->setAllowvendorchange(false);
- _satResolver->setAllowuninstall(false);
- _satResolver->setUpdatesystem(false);
- _satResolver->setAllowvirtualconflicts(false);
- _satResolver->setNoupdateprovide(false);
- _satResolver->setDosplitprovides(false);
- _satResolver->setSolveSrcPackages( solveSrcPackages() );
+ _satResolver->setFixsystem ( isVerifyingMode() );
+ _satResolver->setIgnorealreadyrecommended ( ignoreAlreadyRecommended() );
+ _satResolver->setOnlyRequires ( onlyRequires() );
+ _satResolver->setAllowdowngrade (false);
+ _satResolver->setAllowarchchange (false);
+ _satResolver->setAllowvendorchange ( allowVendorChange() );
+ _satResolver->setAllowuninstall ( forceResolve() );
+ _satResolver->setUpdatesystem (false);
+ _satResolver->setAllowvirtualconflicts (false);
+ _satResolver->setNoupdateprovide (false);
+ _satResolver->setDosplitprovides (false);
+ _satResolver->setSolveSrcPackages ( solveSrcPackages() );
if (_upgradeMode) {
- _satResolver->setAllowdowngrade(true);
- _satResolver->setUpdatesystem(false); // not needed cause packages has already been evaluteted by distupgrade
- _satResolver->setDosplitprovides(true);
- if ( !getenv("ZYPP_NO_SAT_UPDATE") ) {
- MIL << "-------------- Calling SAT Solver in distupgrade mode -------------------" << endl;
- // SAT solver will do the dist update
- _satResolver->setAllowarchchange(true);
- _satResolver->setAllowvendorchange(true);
- _satResolver->setUpdatesystem(true);
- _satResolver->setDistupgrade(true);
- _satResolver->setDistupgrade_removeunsupported(false);
- }
+ // may overwrite some settings
+ _satResolver->setDistupgrade (true);
+ _satResolver->setDistupgrade_removeunsupported (false);
+ _satResolver->setUpdatesystem (true);
+ _satResolver->setAllowdowngrade (true);
+ _satResolver->setAllowarchchange (true);
+ _satResolver->setAllowvendorchange (true);
+ _satResolver->setDosplitprovides (true);
}
- if (_forceResolve)
- _satResolver->setAllowuninstall(true);
-
- if (indeterminate(_onlyRequires))
- _satResolver->setOnlyRequires(ZConfig::instance().solver_onlyRequires());
- else if (_onlyRequires)
- _satResolver->setOnlyRequires(true);
- else
- _satResolver->setOnlyRequires(false);
-
- if (_verifying)
- _satResolver->setFixsystem(true);
-
- if (_ignorealreadyrecommended)
- _satResolver->setIgnorealreadyrecommended(true);
-
// Resetting additional solver information
_isInstalledBy.clear();
_installs.clear();
_installedSatisfied.clear();
}
-bool
-Resolver::resolvePool()
+bool Resolver::resolvePool()
{
solverInit();
return _satResolver->resolvePool(_extra_requires, _extra_conflicts, _addWeak);
}
-bool
-Resolver::resolveQueue(solver::detail::SolverQueueItemList & queue)
+bool Resolver::resolveQueue( solver::detail::SolverQueueItemList & queue )
{
solverInit();
// Getting more information about the solve results
-void
-Resolver::collectResolverInfo(void)
+void Resolver::collectResolverInfo()
{
if ( _satResolver
&& _isInstalledBy.empty()
}
-const ItemCapKindList Resolver::isInstalledBy (const PoolItem item) {
+ItemCapKindList Resolver::isInstalledBy( const PoolItem & item )
+{
ItemCapKindList ret;
collectResolverInfo();
return ret;
}
-const ItemCapKindList Resolver::installs (const PoolItem item) {
+ItemCapKindList Resolver::installs( const PoolItem & item )
+{
ItemCapKindList ret;
collectResolverInfo();
return ret;
}
-const ItemCapKindList Resolver::satifiedByInstalled (const PoolItem item) {
+ItemCapKindList Resolver::satifiedByInstalled( const PoolItem & item )
+{
ItemCapKindList ret;
collectResolverInfo();
return ret;
}
-const ItemCapKindList Resolver::installedSatisfied (const PoolItem item) {
+ItemCapKindList Resolver::installedSatisfied( const PoolItem & item )
+{
ItemCapKindList ret;
collectResolverInfo();
// Regard dependencies of the item weak onl
PoolItemList _addWeak;
+ /** \name Solver flags */
+ //@{
bool _forceResolve; // remove items which are conflicts with others or
// have unfulfilled requirements.
// This behaviour is favourited by ZMD
bool _upgradeMode; // Resolver has been called with doUpgrade
bool _updateMode; // Resolver has been called with doUpdate
bool _verifying; // The system will be checked
- TriBool _onlyRequires; // do install required resolvables only
+ bool _onlyRequires; // do install required resolvables only
// no recommended resolvables, language
// packages, hardware packages (modalias)
+ bool _allowVendorChange; // whether the solver should allow or disallow vendor changes.
bool _solveSrcPackages; // whether to generate solver jobs for selected source packges.
- bool _ignorealreadyrecommended; //ignore recommended packages that have already been recommended by the installed packages
+ bool _ignoreAlreadyRecommended; //ignore recommended packages that have already been recommended by the installed packages
+ //@}
// Additional QueueItems which has to be regarded by the solver
// This will be used e.g. by solution actions
ItemCapKindMap _installedSatisfied;
// helpers
- void collectResolverInfo (void);
+ void collectResolverInfo();
// Unmaintained packages which does not fit to the updated system
// (broken dependencies) will be deleted.
public:
- Resolver (const ResPool & pool);
+ Resolver( const ResPool & pool );
virtual ~Resolver();
// ---------------------------------- I/O
virtual std::ostream & dumpOn( std::ostream & str ) const;
- friend std::ostream& operator<<(std::ostream& str, const Resolver & obj)
+ friend std::ostream& operator<<( std::ostream& str, const Resolver & obj )
{ return obj.dumpOn (str); }
// ---------------------------------- methods
- ResPool pool (void) const;
- void setPool (const ResPool & pool) { _pool = pool; }
+ ResPool pool() const;
+ void setPool( const ResPool & pool ) { _pool = pool; }
- void addExtraRequire (const Capability & capability);
- void removeExtraRequire (const Capability & capability);
- void addExtraConflict (const Capability & capability);
- void removeExtraConflict (const Capability & capability);
+ void addExtraRequire( const Capability & capability );
+ void removeExtraRequire( const Capability & capability );
+ void addExtraConflict( const Capability & capability );
+ void removeExtraConflict( const Capability & capability );
- void removeQueueItem (const SolverQueueItem_Ptr item);
- void addQueueItem (const SolverQueueItem_Ptr item);
+ void removeQueueItem( SolverQueueItem_Ptr item );
+ void addQueueItem( SolverQueueItem_Ptr item );
- const CapabilitySet extraRequires () { return _extra_requires; }
- const CapabilitySet extraConflicts () { return _extra_conflicts; }
+ CapabilitySet extraRequires() { return _extra_requires; }
+ CapabilitySet extraConflicts() { return _extra_conflicts; }
- void addWeak (const PoolItem item);
+ void addWeak( const PoolItem & item );
- void setForceResolve (const bool force) { _forceResolve = force; }
- bool forceResolve() { return _forceResolve; }
-
- void setIgnorealreadyrecommended (const bool ignorealreadyrecommended)
- { _ignorealreadyrecommended = ignorealreadyrecommended; }
- bool ignorealreadyrecommended() { return _ignorealreadyrecommended; }
-
- void setOnlyRequires (const TriBool state)
- { _onlyRequires = state; }
- TriBool onlyRequires () { return _onlyRequires; }
-
- bool verifySystem ();
+ bool verifySystem();
bool resolvePool();
- bool resolveQueue(solver::detail::SolverQueueItemList & queue);
+ bool resolveQueue( SolverQueueItemList & queue );
void doUpdate();
bool doUpgrade( zypp::UpgradeStatistics & opt_stats_r );
- PoolItemList problematicUpdateItems( void ) const;
+ PoolItemList problematicUpdateItems() const;
+
+ /** \name Solver flags */
+ //@{
+ bool ignoreAlreadyRecommended() const { return _ignoreAlreadyRecommended; }
+ void setIgnoreAlreadyRecommended( bool yesno_r ) { _ignoreAlreadyRecommended = yesno_r; }
+
+ bool onlyRequires () const { return _onlyRequires; }
+ void setOnlyRequires( TriBool state_r );
- bool isUpgradeMode() const { return _upgradeMode;};// Resolver has been called with doUpgrade
- bool isUpdateMode() const { return _updateMode;}; // Resolver has been called with doUpdate
- bool isVerifyingMode() const { return _verifying;}; // The system will be checked
- void setVerifyingMode( TriBool state_r ) { _verifying = ( state_r == indeterminate ) ? false : bool(state_r); }
+ bool forceResolve() const { return _forceResolve; }
+ void setForceResolve( TriBool state_r ) { _forceResolve = indeterminate(state_r) ? false : bool(state_r); }
+
+ bool isUpgradeMode() const { return _upgradeMode; }// Resolver has been called with doUpgrade
+
+ bool isUpdateMode() const { return _updateMode; } // Resolver has been called with doUpdate
+
+ bool isVerifyingMode() const { return _verifying; } // The system will be checked
+ void setVerifyingMode( TriBool state_r ) { _verifying = indeterminate(state_r) ? false : bool(state_r); }
+
+ bool allowVendorChange() const { return _allowVendorChange; }
+ void setAllowVendorChange( TriBool state_r );
bool solveSrcPackages() const { return _solveSrcPackages; }
- void setSolveSrcPackages( TriBool state_r ) { _solveSrcPackages = ( state_r == indeterminate ) ? false : bool(state_r); }
+ void setSolveSrcPackages( TriBool state_r ) { _solveSrcPackages = indeterminate(state_r) ? false : bool(state_r); }
+ //@}
- ResolverProblemList problems () const;
- void applySolutions (const ProblemSolutionList &solutions);
+ ResolverProblemList problems() const;
+ void applySolutions( const ProblemSolutionList & solutions );
// reset all SOLVER transaction in pool
- void undo(void);
-
- void reset (bool keepExtras = false );
+ void undo();
- bool testing(void) const { return _testing; }
- void setTesting( bool testing ) { _testing = testing; }
+ void reset( bool keepExtras = false );
// Get more information about the solverrun
// Which item will be installed by another item or triggers an item for
// installation
- const ItemCapKindList isInstalledBy (const PoolItem item);
- const ItemCapKindList installs (const PoolItem item);
- const ItemCapKindList satifiedByInstalled (const PoolItem item);
- const ItemCapKindList installedSatisfied (const PoolItem item);
+ ItemCapKindList isInstalledBy( const PoolItem & item );
+ ItemCapKindList installs( const PoolItem & item );
+ ItemCapKindList satifiedByInstalled (const PoolItem & item );
+ ItemCapKindList installedSatisfied( const PoolItem & item );
};
"solver-system.xml.gz",
resolver.forceResolve(),
resolver.onlyRequires(),
- resolver.ignorealreadyrecommended() );
+ resolver.ignoreAlreadyRecommended() );
for (PoolItemList::const_iterator iter = items_to_install.begin(); iter != items_to_install.end(); iter++) {
control.installResolvable (iter->resolvable(), iter->status());
*file << TAB << "<channel file=\"" << str::numstring((long)it->first.id())
<< "-package.xml.gz\" name=\"" << repo.alias() << "\""
- << " priority=\"" << repo.priority()
+ << " priority=\"" << repo.priority()
<< "\" />" << endl << endl;
}
for (LocaleSet::const_iterator iter = languages.begin(); iter != languages.end(); iter++) {
if (ignorealreadyrecommended)
*file << TAB << "<ignorealreadyrecommended/>" << endl;
-
+
*file << "</setup>" << endl
<< "<trial>" << endl;
}