[zypp-commit] r10803 - in /trunk/libzypp: package/libzypp.changes tools/registration/zypp-query-pool.cc zypp/ResTraits.h zypp/ui/Selectable.h zypp/ui/SelectableImpl.cc
Author: mlandres Date: Fri Aug 8 15:43:12 2008 New Revision: 10803 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10803&view=rev Log: - Adapt zypp-query-pool to new product handling. Modified: trunk/libzypp/package/libzypp.changes trunk/libzypp/tools/registration/zypp-query-pool.cc trunk/libzypp/zypp/ResTraits.h trunk/libzypp/zypp/ui/Selectable.h trunk/libzypp/zypp/ui/SelectableImpl.cc Modified: trunk/libzypp/package/libzypp.changes URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=10803&r1=10802&r2=10803&view=diff ============================================================================== --- trunk/libzypp/package/libzypp.changes (original) +++ trunk/libzypp/package/libzypp.changes Fri Aug 8 15:43:12 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri Aug 8 15:41:17 CEST 2008 - ma@suse.de + +- Adapt zypp-query-pool to new product handling. +- revision 10803 + +------------------------------------------------------------------- Fri Aug 8 14:11:03 CEST 2008 - ma@suse.de - Don't pass epoch to 'rpm -e', it does not support it. Modified: trunk/libzypp/tools/registration/zypp-query-pool.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tools/registration/zypp-query-pool.cc?rev=10803&r1=10802&r2=10803&view=diff ============================================================================== --- trunk/libzypp/tools/registration/zypp-query-pool.cc (original) +++ trunk/libzypp/tools/registration/zypp-query-pool.cc Fri Aug 8 15:43:12 2008 @@ -27,10 +27,10 @@ { bool operator()( const PoolItem & p ) const { - if ( isKind<Package>(p.resolvable()) ) - return p.status().isInstalled(); - else + if ( traits::isPseudoInstalled( p->kind() ) ) return p.status().isSatisfied(); + else + return p.status().isInstalled(); } }; @@ -52,10 +52,10 @@ || _repository == item->repository().info().alias()) { - if ( isKind<Package>(item.resolvable()) ) - cout << (item.status().isInstalled() ? "i" : " "); - else + if ( traits::isPseudoInstalled( item->kind() ) ) cout << (item.status().isSatisfied() ? "i" : " "); + else + cout << (item.status().isInstalled() ? "i" : " "); cout << "|" << item->kind(); cout << "|" << item->name(); Modified: trunk/libzypp/zypp/ResTraits.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResTraits.h?rev=10803&r1=10802&r2=10803&view=diff ============================================================================== --- trunk/libzypp/zypp/ResTraits.h (original) +++ trunk/libzypp/zypp/ResTraits.h Fri Aug 8 15:43:12 2008 @@ -19,7 +19,20 @@ namespace zypp { ///////////////////////////////////////////////////////////////// - /** \defgroup ZYPP_RESOLVABLE_SMART_POINTER_TYPES + /////////////////////////////////////////////////////////////////// + namespace traits + { ///////////////////////////////////////////////////////////////// + + /** Those are denoted to be installed, if the + * solver verifies them as being satisfied. */ + inline bool isPseudoInstalled( ResKind kind_r ) + { return( kind_r == ResKind::patch || kind_r == ResKind::pattern ); } + + ///////////////////////////////////////////////////////////////// + } // namespace traits + /////////////////////////////////////////////////////////////////// + + /** \defgroup ZYPP_RESOLVABLE_SMART_POINTER_TYPES * Resolvable smart pointer types. * * Forward declaration of all Resolvable smart pointer @@ -68,6 +81,10 @@ typedef intrusive_ptr<const _Res> constPtrType; static const ResKind kind; + + /** Those are denoted to be installed, if the + * solver verifies them as being satisfied. */ + static bool isPseudoInstalled() { return traits::isPseudoInstalled( kind ); } }; /** ResTraits specialisation for Resolvable. Modified: trunk/libzypp/zypp/ui/Selectable.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ui/Selectable.h?rev=10803&r1=10802&r2=10803&view=diff ============================================================================== --- trunk/libzypp/zypp/ui/Selectable.h (original) +++ trunk/libzypp/zypp/ui/Selectable.h Fri Aug 8 15:43:12 2008 @@ -154,8 +154,10 @@ */ bool isUnmaintained() const; - /** \name Classification of available patches (patterns). + /** \name Classification of available patches (pseudo installed items). * A patch is either \c not \c relevant, \c satisfied or \c broken. + * The same applies to other pseudo installed kinds. + * \see \ref traits::isPseudoInstalled */ //@{ /** Returns true for packages, because packages are not Modified: trunk/libzypp/zypp/ui/SelectableImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ui/SelectableImpl.cc?rev=10803&r1=10802&r2=10803&view=diff ============================================================================== --- trunk/libzypp/zypp/ui/SelectableImpl.cc (original) +++ trunk/libzypp/zypp/ui/SelectableImpl.cc Fri Aug 8 15:43:12 2008 @@ -186,12 +186,10 @@ return S_Taboo; // KEEP state: - // Report not installable items as installed, if they are satisfied. if ( installedObj() ) return S_KeepInstalled; - - if ( ( kind() == ResKind::patch - || kind() == ResKind::pattern ) + // Report pseudo installed items as installed, if they are satisfied. + if ( traits::isPseudoInstalled( kind() ) && cand.status().isSatisfied() ) // no installed, so we must have candidate return S_KeepInstalled; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
mlandres@svn.opensuse.org