From 2e71e2a73fe77f94cccf2b9c41b0b07376bb3580 Mon Sep 17 00:00:00 2001 From: Klaus Kaempf Date: Mon, 13 Mar 2006 15:55:56 +0000 Subject: [PATCH] prefer architecture over version when choosing the upgrade candidate (-> 157501) --- zypp/solver/detail/ResolverUpgrade.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/zypp/solver/detail/ResolverUpgrade.cc b/zypp/solver/detail/ResolverUpgrade.cc index dbec28fa1..04a9c9abf 100644 --- a/zypp/solver/detail/ResolverUpgrade.cc +++ b/zypp/solver/detail/ResolverUpgrade.cc @@ -295,9 +295,10 @@ MIL << "item " << item << " is installed, candidate is " << candidate << endl; if (installed) { // check if we already have an installed MIL << "found installed " << installed << " for item " << candidate << endl; CandidateMap::const_iterator cand_it = candidatemap.find(installed); - if (cand_it == candidatemap.end() // not in map yet - || (cand_it->second->edition().compare (candidate->edition()) < 0) // or the new has better edition - || (cand_it->second->arch().compare (candidate->arch()) < 0) ) // or the new has better architecture + if (cand_it == candidatemap.end() // not in map yet + || (cand_it->second->arch().compare (candidate->arch()) < 0) // or the new has better architecture + || ((cand_it->second->arch().compare (candidate->arch()) == 0) // or the new has the same architecture + && (cand_it->second->edition().compare (candidate->edition()) < 0) ) ) // and a better edition (-> 157501) { candidatemap[installed] = candidate; // put it in ! } @@ -636,7 +637,7 @@ MIL << "split matched !" << endl; MIL << opt_stats_r << endl; // Setting Resolver to upgrade mode - _upgradeMode = true; +// _upgradeMode = true; } /////////////////////////////////////////////////////////////////// -- 2.34.1