PoolItem Selectable::highestAvailableVersionObj() const
{ return _pimpl->highestAvailableVersionObj(); }
+ bool Selectable::identicalAvailable( const PoolItem & rhs ) const
+ { return _pimpl->identicalAvailable( rhs ); }
+
bool Selectable::identicalInstalled( const PoolItem & rhs ) const
{ return _pimpl->identicalInstalled( rhs ); }
*/
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.
+ /** \c True if \a rhs is installed and one with the same content is available.
+ * Basically the same name, edition, arch, vendor and buildtime.
+ * \see \ref sat::Solvable::identical
+ */
+ bool identicalAvailable( const PoolItem & rhs ) 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
*/
bool identicalInstalled( const PoolItem & rhs ) const;
return _defaultCandidate;
}
- /** \copydoc Selectable::highestAvailableVersionObj() */
+ /** \copydoc Selectable::highestAvailableVersionObj()const */
PoolItem highestAvailableVersionObj() const
{
PoolItem ret;
return ret;
}
- /** \c True if \a rhs has the same content as an installed one.
- * \see \ref sat::Solvable::identical
- */
+ /** \copydoc Selectable::identicalAvailable( const PoolItem & )const */
+ bool identicalAvailable( const PoolItem & rhs ) const
+ {
+ if ( !availableEmpty() && rhs )
+ {
+ for_( it, _availableItems.begin(), _availableItems.end() )
+ {
+ if ( identical( *it, rhs ) )
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /** \copydoc Selectable::identicalInstalled( const PoolItem & )const */
bool identicalInstalled( const PoolItem & rhs ) const
{
if ( !installedEmpty() && rhs )