![](https://seccdn.libravatar.org/avatar/b2c8050acc12d6c8fc86d8342006391c.jpg?s=120&d=mm&r=g)
Author: schubi2 Date: Mon Apr 7 13:10:47 2008 New Revision: 9418 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9418&view=rev Log: added isSatisfied to solvables Modified: trunk/libzypp/zypp/PoolItem.cc trunk/libzypp/zypp/Resolvable.h trunk/libzypp/zypp/sat/Solvable.cc trunk/libzypp/zypp/sat/Solvable.h Modified: trunk/libzypp/zypp/PoolItem.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/PoolItem.cc?rev=9418&r1=9417&r2=9418&view=diff ============================================================================== --- trunk/libzypp/zypp/PoolItem.cc (original) +++ trunk/libzypp/zypp/PoolItem.cc Mon Apr 7 13:10:47 2008 @@ -56,8 +56,7 @@ bool isSatisfied() const { -#warning TBD determine isSatisfied - return true; + return _resolvable->isSatisfied(); } private: Modified: trunk/libzypp/zypp/Resolvable.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Resolvable.h?rev=9418&r1=9417&r2=9418&view=diff ============================================================================== --- trunk/libzypp/zypp/Resolvable.h (original) +++ trunk/libzypp/zypp/Resolvable.h Mon Apr 7 13:10:47 2008 @@ -82,6 +82,12 @@ //@} public: + /** Returns true if the solvable is satisfied */ + using sat::Solvable::isSatisfied; + /** Returns true if the solvable is satisfied */ + using sat::Solvable::isBroken; + + public: const sat::Solvable & satSolvable() const { return *this; } protected: Modified: trunk/libzypp/zypp/sat/Solvable.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/Solvable.cc?rev=9418&r1=9417&r2=9418&view=diff ============================================================================== --- trunk/libzypp/zypp/sat/Solvable.cc (original) +++ trunk/libzypp/zypp/sat/Solvable.cc Mon Apr 7 13:10:47 2008 @@ -19,6 +19,7 @@ #include "zypp/sat/detail/PoolImpl.h" #include "zypp/sat/Solvable.h" +#include "zypp/sat/Pool.h" #include "zypp/Repository.h" #include "zypp/OnMediaLocation.h" @@ -339,6 +340,17 @@ } /////////////////////////////////////////////////////////////////// + + bool Solvable::isSatisfied() const + { + NO_SOLVABLE_RETURN( false ); + if (solvable_trivial_installable (_solvable, Pool::instance().systemRepo().get()) == 1) + return true; + else + return false; + } + + /////////////////////////////////////////////////////////////////// namespace { ///////////////////////////////////////////////////////////////// /** Expand \ref Capability and call \c fnc_r for each namescpace:language Modified: trunk/libzypp/zypp/sat/Solvable.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/Solvable.h?rev=9418&r1=9417&r2=9418&view=diff ============================================================================== --- trunk/libzypp/zypp/sat/Solvable.h (original) +++ trunk/libzypp/zypp/sat/Solvable.h Mon Apr 7 13:10:47 2008 @@ -174,6 +174,12 @@ //@} public: + /** Returns true if the solvable is satisfied */ + bool isSatisfied() const; + /** Returns true if the solvable is satisfied */ + bool isBroken() const { return !isSatisfied(); } + + public: /** \name Locale support. */ //@{ /** Whether this \c Solvable claims to support locales. */ -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org