PoolItem Selectable::updateCandidateObj() const
{ return _pimpl->updateCandidateObj(); }
+ PoolItem Selectable::highestAvailableVersionObj() const
+ { return _pimpl->highestAvailableVersionObj(); }
+
bool Selectable::identicalInstalled( const PoolItem & rhs ) const
{ return _pimpl->identicalInstalled( rhs ); }
*/
PoolItem updateCandidateObj() const;
+ /** Simply the highest available version, ignoring priorities and policies.
+ * It's doubtful whether solely looking at the version makes a good
+ * candidate, but apps ask for it. Beware that different vendors may
+ * use different (uncomparable) version schemata.
+ */
+ PoolItem highestAvailableVersionObj() const;
+
/** \c True if \a rhs has the same content as an installed one.
* Basically the same name, edition, arch, vendor and buildtime.
* \see \ref sat::Solvable::identical
return _defaultCandidate;
}
+ /** \copydoc Selectable::highestAvailableVersionObj() */
+ PoolItem highestAvailableVersionObj() const
+ {
+ PoolItem ret;
+ for_( it, availableBegin(), availableEnd() )
+ {
+ if ( !ret || (*it).satSolvable().edition() > ret.satSolvable().edition() )
+ ret = *it;
+ }
+ return ret;
+ }
+
/** \c True if \a rhs has the same content as an installed one.
* \see \ref sat::Solvable::identical
*/