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().
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

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 40 of file Resolver.cc.

References _pimpl.

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

Dtor.

Definition at line 50 of file Resolver.cc.


Member Function Documentation

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

Resolve package dependencies:.

Verify consistency of system

Definition at line 59 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 61 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 63 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 65 of file Resolver.cc.

References _pimpl.

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

Definition at line 67 of file Resolver.cc.

References _pimpl.

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

Definition at line 69 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 75 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 91 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 71 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 73 of file Resolver.cc.

References _pimpl.

Arch zypp::Resolver::architecture  )  const
 

Definition at line 77 of file Resolver.cc.

References _pimpl.

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

Definition at line 79 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 81 of file Resolver.cc.

References _pimpl.

const bool zypp::Resolver::forceResolve  ) 
 

Definition at line 83 of file Resolver.cc.

References _pimpl.

bool zypp::solver::detail::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 85 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 87 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 89 of file Resolver.cc.

References _pimpl.


Member Data Documentation

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

Definition at line 197 of file Resolver.h.

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


The documentation for this class was generated from the following files:
Generated on Thu Jul 6 00:07:31 2006 for zypp by  doxygen 1.4.6