22#include <solv/solver.h>
25#define ZYPP_USE_RESOLVER_INTERNALS
27#include <zypp/base/Logger.h>
51 os <<
"[" << (
_soft?
"Soft":
"") <<
"InstallOneOf: ";
52 for (PoolItemList::const_iterator iter =
_oneOfList.begin();
66 , _oneOfList (itemList)
81 MIL <<
"Install one of " << (
_soft ?
"(soft):" :
":")<< endl;
85 queue_push( &(q), SOLVER_INSTALL | SOLVER_SOLVABLE_ONE_OF | SOLVER_WEAK);
87 queue_push( &(q), SOLVER_INSTALL | SOLVER_SOLVABLE_ONE_OF );
92 Id
id = (*iter)->satSolvable().id();
94 ERR << *iter <<
" not found" << endl;
97 MIL <<
" candidate:" << *iter <<
" with the SAT-Pool ID: " <<
id << endl;
98 queue_push( &(qs),
id );
102 queue_push( &(q), pool_queuetowhatprovides(satPool.
get(), &qs));
112 new_installOneOf->SolverQueueItem::copy(
this);
113 new_installOneOf->_soft =
_soft;
115 return new_installOneOf;
121 int cmp = this->compare (item);
124 SolverQueueItemInstallOneOf_constPtr install = dynamic_pointer_cast<const SolverQueueItemInstallOneOf>(item);
126 return (
_oneOfList == install->_oneOfList) ? 0 : -1;
static Pool instance()
Singleton ctor.
detail::CPool * get() const
Expert backdoor.
SolverQueueItemInstallOneOf(const ResPool &pool, const PoolItemList &itemList, bool soft=false)
virtual bool addRule(sat::detail::CQueue &q)
virtual ~SolverQueueItemInstallOneOf()
virtual int cmp(SolverQueueItem_constPtr item) const
std::list< PoolItem > PoolItemList
virtual SolverQueueItem_Ptr copy(void) const
virtual std::ostream & dumpOn(std::ostream &str) const
::s_Queue CQueue
Wrapped libsolv C data type exposed as backdoor.
Easy-to use interface to the ZYPP dependency resolver.
#define IMPL_PTR_TYPE(NAME)