bool Resolver::createSolverTestcase (const std::string & dumpPath)
{ solver::detail::Testcase testcase (dumpPath);
return testcase.createTestcase(*_pimpl);}
-#if 1
- const solver::detail::ItemCapKindList Resolver::isSelectedBy (const PoolItem_Ref item)
- { return _pimpl->isSelectedBy (item); }
- const solver::detail::ItemCapKindList Resolver::selects (const PoolItem_Ref item)
- { return _pimpl->selects (item); }
-#endif
+ const solver::detail::ItemCapKindList Resolver::isInstalledBy (const PoolItem_Ref item)
+ { return _pimpl->isInstalledBy (item); }
+ const solver::detail::ItemCapKindList Resolver::installs (const PoolItem_Ref item)
+ { return _pimpl->installs (item); }
/////////////////////////////////////////////////////////////////
/**
- * Gives information about WHO has selected an item for installation.
+ * Gives information about WHO has pused an installation of an given item.
*
* \param item Evaluate additional information for this resolvable.
* \return A list of structures which contains:
- * item Item which has triggered the selection of the given param item.
- * cap Capability which has triggerd this selection
+ * item Item which has triggered the installation of the given param item.
+ * cap Capability which has triggerd this installation
* capKind Kind of that capability (e.g. Dep::REQUIRES,Dep::RECOMMENDS,... )
*
- * Note: Start a solver run before in order to have a result. Not matter if it is valid or invalid.
+ * Note: In order to have a result start a solver run before. Not matter if it is valid or invalid.
*
*/
- const solver::detail::ItemCapKindList isSelectedBy (const PoolItem_Ref item);
+ const solver::detail::ItemCapKindList isInstalledBy (const PoolItem_Ref item);
/**
- * Gives information about WHICH additional items have been selected by the given item.
+ * Gives information about WHICH additional items will be installed due the installation of an item.
*
* \param item Evaluate additional information for this resolvable.
* \return A list of structures which contains:
- * item Item which has BEEN triggered by the selection of the given param item.
- * cap Capability which has BEEN triggerd by this selection
+ * item Item which will be installed due to the installation of the given param item too.
+ * cap Capability which causes the installation
* capKind Kind of that capability (e.g. Dep::REQUIRES,Dep::RECOMMENDS,... )
*
- * Note: Start a solver run before in order to have a result. Not matter if it is valid or invalid.
+ * Note: In order to have a result start a solver run before. Not matter if it is valid or invalid.
*
*/
- const solver::detail::ItemCapKindList selects (const PoolItem_Ref item);
+ const solver::detail::ItemCapKindList installs (const PoolItem_Ref item);
protected:
_best_context = NULL;
_timed_out = false;
- _isSelectedBy.clear();
- _selects.clear();
+ _isInstalledBy.clear();
+ _installs.clear();
if (resetValidResults)
contextPool.reset();
//--------------------------------------------------------------------------------------------------
// Get more information about the solverrun
-// Which item will be triggerd by another item or triggers an item for installation
+// Which item will be installed by another item or triggers an item for installation
typedef struct {
- ItemCapKindMap isSelectedBy;
- ItemCapKindMap selects;
+ ItemCapKindMap isInstalledBy;
+ ItemCapKindMap installs;
} Collector;
for (PoolItemList::const_iterator iter = itemList.begin();
iter != itemList.end(); iter++) {
ItemCapKind capKind( *iter, needed_by->capability(), needed_by->capKind() );
- collector->isSelectedBy.insert (make_pair( item, capKind));
+ collector->isInstalledBy.insert (make_pair( item, capKind));
ItemCapKind capKindReverse( item, needed_by->capability(), needed_by->capKind() );
- collector->selects.insert (make_pair( *iter, capKindReverse));
+ collector->installs.insert (make_pair( *iter, capKindReverse));
}
}
{
ResolverContext_Ptr collectContext = context(); // best context or failed context
if ( collectContext != NULL
- && _isSelectedBy.empty()
- && _selects.empty()) {
+ && _isInstalledBy.empty()
+ && _installs.empty()) {
Collector collector;
collectContext->foreachInfo (PoolItem(), RESOLVER_INFO_PRIORITY_VERBOSE, collector_cb_needed, &collector);
- _isSelectedBy = collector.isSelectedBy;
- _selects = collector.selects;
+ _isInstalledBy = collector.isInstalledBy;
+ _installs = collector.installs;
}
}
-const ItemCapKindList Resolver::isSelectedBy (const PoolItem_Ref item) {
+const ItemCapKindList Resolver::isInstalledBy (const PoolItem_Ref item) {
ItemCapKindList ret;
collectResolverInfo();
- for (ItemCapKindMap::const_iterator iter = _isSelectedBy.find(item); iter != _isSelectedBy.end();) {
+ for (ItemCapKindMap::const_iterator iter = _isInstalledBy.find(item); iter != _isInstalledBy.end();) {
ItemCapKind info = iter->second;
PoolItem_Ref iterItem = iter->first;
if (iterItem == item) {
iter++;
} else {
// exit
- iter = _isSelectedBy.end();
+ iter = _isInstalledBy.end();
}
}
return ret;
}
-const ItemCapKindList Resolver::selects (const PoolItem_Ref item) {
+const ItemCapKindList Resolver::installs (const PoolItem_Ref item) {
ItemCapKindList ret;
collectResolverInfo();
- for (ItemCapKindMap::const_iterator iter = _selects.find(item); iter != _selects.end();) {
+ for (ItemCapKindMap::const_iterator iter = _installs.find(item); iter != _installs.end();) {
ItemCapKind info = iter->second;
PoolItem_Ref iterItem = iter->first;
if (iterItem == item) {
iter++;
} else {
// exit
- iter = _selects.end();
+ iter = _installs.end();
}
}
return ret;
PoolItemList _update_items;
// Additional information about the solverrun
- ItemCapKindMap _isSelectedBy;
- ItemCapKindMap _selects;
+ ItemCapKindMap _isInstalledBy;
+ ItemCapKindMap _installs;
CapSet _extra_caps;
CapSet _extra_conflicts;
void undo(void);
// Get more information about the solverrun
- // Which item will be triggerd by another item or triggers an item for
+ // Which item will be installed by another item or triggers an item for
// installation
- const ItemCapKindList isSelectedBy (const PoolItem_Ref item);
- const ItemCapKindList selects (const PoolItem_Ref item);
+ const ItemCapKindList isInstalledBy (const PoolItem_Ref item);
+ const ItemCapKindList installs (const PoolItem_Ref item);
// only for testsuite
void reset (const bool resetValidResults = false);