aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-18 12:59:43 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-18 12:59:43 +0100
commitd2281be210f759c8d07ffa2704b2ed158fe6d71d (patch)
treede9a56758fef8829ab3892e112a9af0e788eb61b
parentf3c1ae18f68788ed6a6752114fe6e93b454499b6 (diff)
downloadpaludis-d2281be210f759c8d07ffa2704b2ed158fe6d71d.tar.gz
paludis-d2281be210f759c8d07ffa2704b2ed158fe6d71d.tar.xz
Don't require not best confirmation for equal versions
-rw-r--r--paludis/resolver/decider.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index 2e9d334..1be3bba 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -1627,10 +1627,13 @@ Decider::_find_id_for_from(
const std::tr1::shared_ptr<const Resolution> & resolution,
const std::tr1::shared_ptr<const PackageIDSequence> & ids) const
{
- bool best(true);
+ std::tr1::shared_ptr<const PackageID> best_version;
for (PackageIDSequence::ReverseConstIterator i(ids->rbegin()), i_end(ids->rend()) ;
i != i_end ; ++i)
{
+ if (! best_version)
+ best_version = *i;
+
bool ok(true);
for (Constraints::ConstIterator c(resolution->constraints()->begin()),
c_end(resolution->constraints()->end()) ;
@@ -1646,9 +1649,7 @@ Decider::_find_id_for_from(
}
if (ok)
- return std::make_pair(*i, best);
-
- best = false;
+ return std::make_pair(*i, (*i)->version() == best_version->version());
}
return std::make_pair(make_null_shared_ptr(), false);