51 for (PoolItemList::const_iterator iter = itemlist.begin(); iter != itemlist.end(); ++iter) {
52 if (iter != itemlist.begin())
82 functor::functorRef<bool,PoolItem> (info) );
84 _XDEBUG(
"Helper::findInstalledByNameAndKind (" << name <<
", " << kind <<
") => " << info.
item);
95 PoolItem Helper::findInstalledItem(
const std::vector<PoolItem> & pool,
PoolItem item )
109 functor::functorRef<bool,PoolItem> (info) );
111 _XDEBUG(
"Helper::findUninstalledByNameAndKind (" << name <<
", " << kind <<
") => " << info.
item);
129 WAR <<
"Warning: '" << provider <<
"' not valid" << endl;
133 if ( installed.resolvable() )
135 if ( !VendorAttr::instance().equivalent( installed, provider ) )
137 MIL <<
"Discarding '" << provider <<
"' from vendor '"
138 << provider->vendor() <<
"' different to uninstalled '"
139 << installed->vendor() <<
"' vendor." << endl;
145 || (uninstalled->edition().compare( provider->edition() ) < 0)
146 || (uninstalled->arch().compare( provider->arch() ) < 0) )
149 uninstalled = provider;
159 template<
class _Iter>
168 functor::functorRef<bool,PoolItem> (info) );
193 uninstalled = provider;
209 functor::functorRef<bool,PoolItem> (info) );
232 int archcmp = _item->arch().compare( provider->arch() );
235 && (_item->edition().compare( provider->edition() ) < 0)))
256 functor::functorRef<bool,PoolItem>( info ) );
258 _XDEBUG(
"Helper::isBestUninstalledItem(" << item <<
") => " << info.
is_best);
266 if (!item)
return "";
268 if (item->kind() != ResKind::package)
269 os << item->kind() <<
':';
272 os <<
'-' << item->edition();
273 if (item->arch() !=
"") {
274 os <<
'.' << item->arch();
277 string alias = item->repoInfo().alias();
279 && alias !=
"@System")
281 os <<
'[' << alias <<
']';
static PoolItem findInstalledByNameAndKind(_Iter begin, _Iter end, const string &name, const Resolvable::Kind &kind)
bool operator()(PoolItem provider)
bool operator()(PoolItem provider)
int invokeOnEach(_Iterator begin_r, _Iterator end_r, _Filter filter_r, _Function fnc_r)
Iterate through [begin_r,end_r) and invoke fnc_r on each item that passes filter_r.
std::list< PoolItem > PoolItemList
byIdent_iterator byIdentEnd(const ByIdent &ident_r) const
bool operator()(PoolItem provider)
Select PoolItem by installed.
ResObject::constPtr resolvable() const
Returns the ResObject::constPtr.
static PoolItem findUpdateItem(_Iter begin, _Iter end, PoolItem item)
std::unary_function< PoolItem, bool > PoolItemFilterFunctor
std::ostream & operator<<(std::ostream &str, const ::_Dataiterator *obj)
ResStatus & status() const
Returns the current status.
Chain< _ACondition, _BCondition > chain(_ACondition conda_r, _BCondition condb_r)
Convenience function for creating a Chain from two conditions conda_r and condb_r.
ByEdition< _Compare > byEdition(const Edition &edition_r, _Compare cmp_r)
Select PoolItem by uninstalled.
CheckIfBest(PoolItem item)
bool operator()(PoolItem provider)
Reference to a PoolItem connecting ResObject and ResStatus.
std::string asString() const
std::string itemToString(const PoolItem &item)
byIdent_iterator byIdentBegin(const ByIdent &ident_r) const