#include <InstallOrder.h>
Classes | |
struct | NodeInfo |
Public Member Functions | |
InstallOrder (const ResPool &pool, const PoolItemSet &toinstall, const PoolItemSet &installed) | |
Constructor. | |
PoolItemList | computeNextSet () |
Compute a list of ResItems which have no requirements and can be installed in parallel without conflicts. | |
void | setInstalled (PoolItem item) |
set a Solvable as installed, computeNextSet is able to compute a new set then | |
void | setInstalled (const PoolItemList &list) |
like above, for convenience | |
void | startrdfs () |
recoursive depth first search, build internal trees | |
void | init () |
Initialize data structures. | |
const PoolItemList | getTopSorted () const |
compute topological sorted list | |
void | printAdj (std::ostream &os, bool reversed=false) const |
Private Types | |
typedef std::map< PoolItem, PoolItemList > | Graph |
adjacency list type | |
typedef std::map< PoolItem, NodeInfo > | Nodes |
Private Member Functions | |
void | rdfsvisit (PoolItem item) |
PoolItem | findProviderInSet (const Capability requirement, const PoolItemSet &candidates) const |
bool | doesProvide (const Capability requirement, PoolItem item) const |
Private Attributes | |
const ResPool & | _pool |
PoolItemSet | _toinstall |
PoolItemSet | _installed |
Graph | _graph |
adjacency list, package -> requirements | |
Graph | _rgraph |
reversed graph, package -> referers | |
Nodes | _nodes |
unsigned | _rdfstime |
PoolItemList | _topsorted |
bool | _dirty |
unsigned | _numrun |
std::set< std::string > | _logset |
There are two Interfaces:
Definition at line 62 of file InstallOrder.h.
typedef std::map<PoolItem, PoolItemList> zypp::solver::detail::InstallOrder::Graph [private] |
typedef std::map<PoolItem, NodeInfo> zypp::solver::detail::InstallOrder::Nodes [private] |
Definition at line 91 of file InstallOrder.h.
zypp::solver::detail::InstallOrder::InstallOrder | ( | const ResPool & | pool, | |
const PoolItemSet & | toinstall, | |||
const PoolItemSet & | installed | |||
) |
Constructor.
toinstall | Set of ResItems that have to be installed | |
installed | Set of ResItems that are already installed |
Definition at line 58 of file InstallOrder.cc.
References _DEBUG, _installed, and _toinstall.
void zypp::solver::detail::InstallOrder::rdfsvisit | ( | PoolItem | item | ) | [private] |
Definition at line 184 of file InstallOrder.cc.
References _graph, _installed, _logset, _nodes, _pool, _rdfstime, _rgraph, _toinstall, _topsorted, zypp::sat::WhatProvides::begin(), zypp::sat::WhatObsoletes::begin(), zypp::solver::detail::InstallOrder::NodeInfo::begintime, zypp::sat::WhatProvides::end(), zypp::sat::WhatObsoletes::end(), zypp::ResPool::find(), for_, zypp::ui::Selectable::get(), zypp::ResPool::instance(), zypp::sat::Pool::instance(), ITEMNAME, zypp::solver::detail::InstallOrder::NodeInfo::order, zypp::Dep::PREREQUIRES, zypp::Dep::REQUIRES, zypp::PoolItem::resolvable(), zypp::solver::detail::InstallOrder::NodeInfo::visited, WAR, and XXX.
Referenced by startrdfs().
PoolItem zypp::solver::detail::InstallOrder::findProviderInSet | ( | const Capability | requirement, | |
const PoolItemSet & | candidates | |||
) | const [private] |
bool zypp::solver::detail::InstallOrder::doesProvide | ( | const Capability | requirement, | |
PoolItem | item | |||
) | const [private] |
Definition at line 156 of file InstallOrder.cc.
References zypp::Dep::PROVIDES, and zypp::CapMatch::yes.
Referenced by findProviderInSet().
PoolItemList zypp::solver::detail::InstallOrder::computeNextSet | ( | ) |
Compute a list of ResItems which have no requirements and can be installed in parallel without conflicts.
Use setInstalled to make computation of a different set possible
Definition at line 96 of file InstallOrder.cc.
References _dirty, _nodes, ITEMNAME, startrdfs(), and XXX.
Referenced by zypp::pool::GetResolvablesToInsDel::GetResolvablesToInsDel().
void zypp::solver::detail::InstallOrder::setInstalled | ( | PoolItem | item | ) |
set a Solvable as installed, computeNextSet is able to compute a new set then
Definition at line 119 of file InstallOrder.cc.
References _dirty, _installed, _nodes, _rgraph, _toinstall, ITEMNAME, zypp::solver::detail::InstallOrder::NodeInfo::order, WAR, and XXX.
Referenced by zypp::pool::GetResolvablesToInsDel::GetResolvablesToInsDel(), and setInstalled().
void zypp::solver::detail::InstallOrder::setInstalled | ( | const PoolItemList & | list | ) |
like above, for convenience
Definition at line 145 of file InstallOrder.cc.
References setInstalled().
void zypp::solver::detail::InstallOrder::startrdfs | ( | ) |
recoursive depth first search, build internal trees
Definition at line 322 of file InstallOrder.cc.
References _dirty, _graph, _nodes, _numrun, _rdfstime, _rgraph, _toinstall, _topsorted, ITEMNAME, rdfsvisit(), and XXX.
Referenced by computeNextSet(), and init().
void zypp::solver::detail::InstallOrder::init | ( | ) | [inline] |
Initialize data structures.
Must be called before any other function.
Definition at line 147 of file InstallOrder.h.
References startrdfs().
Referenced by zypp::pool::GetResolvablesToInsDel::GetResolvablesToInsDel().
const PoolItemList zypp::solver::detail::InstallOrder::getTopSorted | ( | ) | const |
compute topological sorted list
Definition at line 362 of file InstallOrder.cc.
References _topsorted.
Referenced by zypp::pool::GetResolvablesToInsDel::GetResolvablesToInsDel().
void zypp::solver::detail::InstallOrder::printAdj | ( | std::ostream & | os, | |
bool | reversed = false | |||
) | const |
Definition at line 72 of file InstallOrder.cc.
References _graph, _nodes, and _rgraph.
Referenced by zypp::pool::GetResolvablesToInsDel::GetResolvablesToInsDel().
const ResPool& zypp::solver::detail::InstallOrder::_pool [private] |
Definition at line 66 of file InstallOrder.h.
Referenced by InstallOrder(), rdfsvisit(), setInstalled(), and startrdfs().
Definition at line 67 of file InstallOrder.h.
Referenced by InstallOrder(), rdfsvisit(), and setInstalled().
adjacency list, package -> requirements
Definition at line 73 of file InstallOrder.h.
Referenced by printAdj(), rdfsvisit(), and startrdfs().
reversed graph, package -> referers
Definition at line 76 of file InstallOrder.h.
Referenced by printAdj(), rdfsvisit(), setInstalled(), and startrdfs().
Definition at line 93 of file InstallOrder.h.
Referenced by computeNextSet(), printAdj(), rdfsvisit(), setInstalled(), and startrdfs().
unsigned zypp::solver::detail::InstallOrder::_rdfstime [private] |
Definition at line 97 of file InstallOrder.h.
Referenced by getTopSorted(), rdfsvisit(), and startrdfs().
bool zypp::solver::detail::InstallOrder::_dirty [private] |
Definition at line 99 of file InstallOrder.h.
Referenced by computeNextSet(), setInstalled(), and startrdfs().
unsigned zypp::solver::detail::InstallOrder::_numrun [private] |
std::set<std::string> zypp::solver::detail::InstallOrder::_logset [private] |