Author: schubi2 Date: Thu Nov 6 09:41:21 2008 New Revision: 11585 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11585&view=rev Log: adding rule rpm-arch for installed rpm package in order to avoid unneeded architecture change Modified: trunk/libzypp/zypp/solver/detail/SATResolver.cc Modified: trunk/libzypp/zypp/solver/detail/SATResolver.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/SATResolver.cc?rev=11585&r1=11584&r2=11585&view=diff ============================================================================== --- trunk/libzypp/zypp/solver/detail/SATResolver.cc (original) +++ trunk/libzypp/zypp/solver/detail/SATResolver.cc Thu Nov 6 09:41:21 2008 @@ -1331,6 +1331,22 @@ queue_push( &(_jobQueue), iter->id() ); MIL << "SYSTEM Conflicts " << *iter << endl; } + + // try to prefer none architecture change if possible + // So the architecture of the "rpm" package should be prefered + Capability cap("rpm"); + sat::WhatProvides rpmProviders(cap); + for_( iter2, rpmProviders.begin(), rpmProviders.end() ) { + PoolItem provider = ResPool::instance().find(*iter2); + if (provider.status().isInstalled()) { + queue_push(&(_jobQueue), SOLVER_INSTALL|SOLVABLE_NAME|SOLVER_ESSENTIAL); + sat::detail::IdType nid = IdString( provider->name() ).id(); + queue_push(&(_jobQueue), rel2id(_SATPool, + nid, + provider->arch().id(), REL_ARCH, true)); + } + } + } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org