zypp::Resolver Class Reference

Resolver interface. More...

#include <Resolver.h>

Inheritance diagram for zypp::Resolver:

zypp::base::ReferenceCounted NonCopyable List of all members.

Public Member Functions

 Resolver (const ResPool &pool)
 Ctor.
virtual ~Resolver ()
 Dtor.
bool verifySystem (void)
 Resolve package dependencies:.
bool establishPool (void)
 Establish state of 'higher level' Resolvables in Pool.
bool freshenPool (void)
 go through all package 'freshen' dependencies and schedule matches for installation.
bool resolvePool (void)
 Resolve package dependencies:.
void undo (void)
solver::detail::ResolverContext_Ptr context (void) const
void doUpgrade (UpgradeStatistics &opt_stats_r)
 Do an distribution upgrade.
std::list< PoolItem_RefproblematicUpdateItems (void) const
 Return the list of problematic update items i.e.
ResolverProblemList problems ()
 Return the dependency problems found by the last call to resolveDependencies().
std::list< std::string > problemDescription (void) const
 Return more solver information if an error has happened.
void applySolutions (const ProblemSolutionList &solutions)
 Apply problem solutions.
Arch architecture () const
void setArchitecture (const Arch &arch)
void setForceResolve (const bool force)
 Remove resolvables which are conflicts with others or have unfulfilled requirements.
const bool forceResolve ()
bool transactResObject (ResObject::constPtr robj, bool install=true)
 transact a single ResObject
bool transactResKind (Resolvable::Kind kind)
 transact all objects of this kind
void transactReset (ResStatus::TransactByValue causer)
 reset any transact states
void setTimeout (int seconds)
 Setting solver timeout.
int timeout ()
 Getting solver timeout in seconds.
void setMaxSolverPasses (int count)
 Restricting solver passes.
int maxSolverPasses ()
 Count of max solver passes.
bool createSolverTestcase (const std::string &dumpPath="/var/log/YaST2/solverTestcase")
 Generates a solver Testcase of the current state.

Private Attributes

solver::detail::Resolver_Ptr _pimpl

Detailed Description

Resolver interface.

Definition at line 39 of file Resolver.h.


Constructor & Destructor Documentation

zypp::solver::detail::Resolver::Resolver ( const ResPool pool  ) 

Ctor.

Definition at line 41 of file Resolver.cc.

References _pimpl.

zypp::solver::detail::Resolver::~Resolver (  )  [virtual]

Dtor.

Definition at line 51 of file Resolver.cc.


Member Function Documentation

bool zypp::solver::detail::Resolver::verifySystem ( void   ) 

Resolve package dependencies:.

Verify consistency of system

Definition at line 60 of file Resolver.cc.

References _pimpl.

bool zypp::solver::detail::Resolver::establishPool ( void   ) 

Establish state of 'higher level' Resolvables in Pool.

Must be called when dealing with non-package resolvables, like Patches, Patterns, and Products

Must be called with a 'plain' pool, e.g. no additonal transacts set.

return true if it was successful return false if not (this will only happen if other transactions are in the pool which will lead to no solution)

Definition at line 62 of file Resolver.cc.

References _pimpl.

bool zypp::solver::detail::Resolver::freshenPool ( void   ) 

go through all package 'freshen' dependencies and schedule matches for installation.

To be called at begin of installation and upgrade. Probably also useful after adding a new package repository.

return true if it was successful return false if not (this will only happen if other transactions are in the pool which will lead to no solution)

Definition at line 64 of file Resolver.cc.

References _pimpl.

bool zypp::solver::detail::Resolver::resolvePool ( void   ) 

Resolve package dependencies:.

Try to execute all pending transactions (there may be more than one!).

Returns "true" on success (i.e., if there were no problems that need user interaction) and "false" if there were problems. In the latter case, use problems() and later applySolutions() below.

Definition at line 66 of file Resolver.cc.

References _pimpl.

Referenced by zypp::solver::detail::Testcase::createTestcase().

void zypp::solver::detail::Resolver::undo ( void   ) 

Definition at line 68 of file Resolver.cc.

References _pimpl.

ResolverContext_Ptr zypp::solver::detail::Resolver::context ( void   )  const

Definition at line 70 of file Resolver.cc.

References _pimpl.

void zypp::solver::detail::Resolver::doUpgrade ( UpgradeStatistics opt_stats_r  ) 

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.

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

Definition at line 78 of file Resolver.cc.

References _pimpl.

std::list< PoolItem_Ref > zypp::Resolver::problematicUpdateItems ( void   )  const

Return the list of problematic update items i.e.

locked ones (due to foreign vendor)

Definition at line 94 of file Resolver.cc.

References _pimpl.

ResolverProblemList zypp::solver::detail::Resolver::problems (  ) 

Return the dependency problems found by the last call to resolveDependencies().

If there were no problems, the returned list will be empty.

Definition at line 72 of file Resolver.cc.

References _pimpl.

std::list< std::string > zypp::solver::detail::Resolver::problemDescription ( void   )  const

Return more solver information if an error has happened.

Definition at line 74 of file Resolver.cc.

References _pimpl.

void zypp::solver::detail::Resolver::applySolutions ( const ProblemSolutionList solutions  ) 

Apply problem solutions.

No more than one solution per problem can be applied.

Definition at line 76 of file Resolver.cc.

References _pimpl.

Arch zypp::Resolver::architecture (  )  const

Definition at line 80 of file Resolver.cc.

References _pimpl.

Referenced by zypp::solver::detail::Testcase::createTestcase().

void zypp::Resolver::setArchitecture ( const Arch arch  ) 

Definition at line 82 of file Resolver.cc.

References _pimpl.

void zypp::Resolver::setForceResolve ( const bool  force  ) 

Remove resolvables which are conflicts with others or have unfulfilled requirements.

This behaviour is favourited by ZMD.

Definition at line 84 of file Resolver.cc.

References _pimpl.

const bool zypp::Resolver::forceResolve (  ) 

Definition at line 86 of file Resolver.cc.

References _pimpl.

bool zypp::Resolver::transactResObject ( ResObject::constPtr  robj,
bool  install = true 
)

transact a single ResObject

Installs (install == true) or removes (install == false) all required and recommended packages(!) of robj (More or less a 'single step' resolver call)

returns false if requirements are not all fulfillable

Definition at line 88 of file Resolver.cc.

References _pimpl.

Referenced by zypp::solver::detail::TransactKind::operator()().

bool zypp::solver::detail::Resolver::transactResKind ( Resolvable::Kind  kind  ) 

transact all objects of this kind

Look through the pool and runs transactResObject, first for removes then for installs (More or less a 'single step' resolver call)

returns false if any transactResObject() call returned false.

Definition at line 90 of file Resolver.cc.

References _pimpl.

void zypp::solver::detail::Resolver::transactReset ( ResStatus::TransactByValue  causer  ) 

reset any transact states

Look through the pool and clear transact state. It will only reset states which have an equal or lower causer

Definition at line 92 of file Resolver.cc.

References _pimpl.

void zypp::Resolver::setTimeout ( int  seconds  ) 

Setting solver timeout.

Stop solving after a given timeframe (seconds) seconds = 0 : No timeout

Definition at line 96 of file Resolver.cc.

References _pimpl.

int zypp::Resolver::timeout (  ) 

Getting solver timeout in seconds.

Definition at line 100 of file Resolver.cc.

References _pimpl.

void zypp::Resolver::setMaxSolverPasses ( int  count  ) 

Restricting solver passes.

Stop solving after a given amount of passes count = 0 : No restriction

Definition at line 98 of file Resolver.cc.

References _pimpl.

int zypp::Resolver::maxSolverPasses (  ) 

Count of max solver passes.

Definition at line 102 of file Resolver.cc.

References _pimpl.

bool zypp::Resolver::createSolverTestcase ( const std::string &  dumpPath = "/var/log/YaST2/solverTestcase"  ) 

Generates a solver Testcase of the current state.

return true if it was successful

Definition at line 104 of file Resolver.cc.

References _pimpl, and zypp::solver::detail::Testcase::createTestcase().


Member Data Documentation

solver::detail::Resolver_Ptr zypp::Resolver::_pimpl [private]

Definition at line 240 of file Resolver.h.

Referenced by applySolutions(), architecture(), context(), createSolverTestcase(), doUpgrade(), establishPool(), forceResolve(), freshenPool(), maxSolverPasses(), problematicUpdateItems(), problemDescription(), problems(), resolvePool(), Resolver(), setArchitecture(), setForceResolve(), setMaxSolverPasses(), setTimeout(), timeout(), transactReset(), transactResKind(), transactResObject(), undo(), and verifySystem().


The documentation for this class was generated from the following files:
Generated on Tue Nov 28 16:49:37 2006 for zypp by  doxygen 1.5.0