PoolItem Selectable::updateCandidateObj() const
{ return _pimpl->updateCandidateObj(); }
+ bool Selectable::identicalInstalled( const PoolItem & rhs ) const
+ { return _pimpl->identicalInstalled( rhs ); }
+
PoolItem Selectable::setCandidate( const PoolItem & newCandidate_r, ResStatus::TransactByValue causer_r )
{ return _pimpl->setCandidate( newCandidate_r, causer_r ); }
*/
PoolItem updateCandidateObj() 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;
+
+ /** \c True if the \ref candidateObj is installed (same content).
+ * \see \ref identicalInstalled.
+ */
+ bool identicalInstalledCandidate() const
+ { return identicalInstalled( candidateObj() ); }
+
+ /** \c True if the \ref updateCandidateObj is installed (same content).
+ * \see \ref identicalInstalled.
+ */
+ bool identicalInstalledUpdateCandidate() const
+ { return identicalInstalled( updateCandidateObj() ); }
+
/** Return the \ref installedObj resolvable casted to a specific kind.
* \code
return _defaultCandidate;
}
+ /** \c True if \a rhs has the same content as an installed one.
+ * \see \ref sat::Solvable::identical
+ */
+ bool identicalInstalled( const PoolItem & rhs ) const
+ {
+ if ( !installedEmpty() && rhs )
+ {
+ for_( it, _installedItems.begin(), _installedItems.end() )
+ {
+ if ( identical( *it, rhs ) )
+ return true;
+ }
+ }
+ return false;
+ }
+
/** Best among all objects. */
PoolItem theObj() const
{