Author: schubi2 Date: Tue Jul 17 10:46:57 2007 New Revision: 6034 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6034&view=rev Log: Evalute update canditate: Take canditates only which are really installable. Bug 292077 Modified: trunk/libzypp/package/libzypp.changes trunk/libzypp/zypp/solver/detail/QueueItemRequire.cc Modified: trunk/libzypp/package/libzypp.changes URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=6034&r1=6033&r2=6034&view=diff ============================================================================== --- trunk/libzypp/package/libzypp.changes (original) +++ trunk/libzypp/package/libzypp.changes Tue Jul 17 10:46:57 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Jul 17 10:45:39 CEST 2007 - schubi@suse.de + +- Evalute update canditate: + Take canditates only which are really installable. Bug 292077 + +------------------------------------------------------------------- Mon Jul 16 15:41:31 CEST 2007 - jkupec@suse.cz - fixed some tribool bugs in RepoInfo Modified: trunk/libzypp/zypp/solver/detail/QueueItemRequire.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/QueueItemRequire.cc?rev=6034&r1=6033&r2=6034&view=diff ============================================================================== --- trunk/libzypp/zypp/solver/detail/QueueItemRequire.cc (original) +++ trunk/libzypp/zypp/solver/detail/QueueItemRequire.cc Tue Jul 17 10:46:57 2007 @@ -345,31 +345,34 @@ bool operator()( PoolItem_Ref provider ) { - UpgradesMap::iterator it = upgrades.find( provider->name() ); - - if (it != upgrades.end()) { // provider with same name found - if (!_context->upgradeMode() - && it->second->arch() != installed->arch() - && provider->arch() == installed->arch()) { - // prefering the same architecture as the installed item - // NOT in upgrade mode - it->second = provider; - } else { - int cmp = it->second->arch().compare( provider->arch() ); - if ((_context->upgradeMode() // only in upgrade mode - || it->second->arch() != installed->arch()) // or have not found the same arch as installed item - && cmp < 0) { // new provider has better arch + if ( provider.status().maySetToBeInstalled( ResStatus::SOLVER )) { + // Take canditates only which are really installable. Bug 292077 + UpgradesMap::iterator it = upgrades.find( provider->name() ); + + if (it != upgrades.end()) { // provider with same name found + if (!_context->upgradeMode() + && it->second->arch() != installed->arch() + && provider->arch() == installed->arch()) { + // prefering the same architecture as the installed item + // NOT in upgrade mode it->second = provider; - } - else if (cmp == 0) { // new provider has equal arch - if (it->second->edition().compare( provider->edition() ) < 0) { - it->second = provider; // new provider has better edition + } else { + int cmp = it->second->arch().compare( provider->arch() ); + if ((_context->upgradeMode() // only in upgrade mode + || it->second->arch() != installed->arch()) // or have not found the same arch as installed item + && cmp < 0) { // new provider has better arch + it->second = provider; + } + else if (cmp == 0) { // new provider has equal arch + if (it->second->edition().compare( provider->edition() ) < 0) { + it->second = provider; // new provider has better edition + } } } + } else { + upgrades[provider->name()] = provider; } - } else { - upgrades[provider->name()] = provider; - } + } return true; } }; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org