Author: mlandres Date: Thu Jul 31 19:05:12 2008 New Revision: 10710 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10710&view=rev Log: - Follow solver policy and make repository priority the highest key, when ordering packages. Then architecture, and edition last. Modified: trunk/libzypp/package/libzypp.changes trunk/libzypp/zypp/ui/SelectableTraits.h Modified: trunk/libzypp/package/libzypp.changes URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=10710&r1=10709&r2=10710&view=diff ============================================================================== --- trunk/libzypp/package/libzypp.changes (original) +++ trunk/libzypp/package/libzypp.changes Thu Jul 31 19:05:12 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Jul 31 19:01:14 CEST 2008 ma@suse.de + +- Follow solver policy and make repository priority the highest + key, when ordering packages. Then architecture, and edition last. +- revision 10710 + +------------------------------------------------------------------- Wed Jul 30 19:12:00 CEST 2008 ma@suse.de - /var/lib/zypp and /var/cache/zypp should be owned by libzypp Modified: trunk/libzypp/zypp/ui/SelectableTraits.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ui/SelectableTraits.h?rev=10710&r1=10709&r2=10710&view=diff ============================================================================== --- trunk/libzypp/zypp/ui/SelectableTraits.h (original) +++ trunk/libzypp/zypp/ui/SelectableTraits.h Thu Jul 31 19:05:12 2008 @@ -33,6 +33,7 @@ struct SelectableTraits { /** Oder on AvalableItemSet. + * \li repository priority * \li best Arch * \li best Edition * \li ResObject::constPtr as fallback. @@ -46,6 +47,10 @@ // bool operator()( const PoolItem & lhs, const PoolItem & rhs ) const { + unsigned lprio = lhs->satSolvable().repository().info().priority(); + unsigned rprio = rhs->satSolvable().repository().info().priority(); + if ( lprio != rprio ) + return( lprio < rprio ); // lower value meands higher priority :( int res = lhs->arch().compare( rhs->arch() ); if ( res ) return res > 0; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org