aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-09 15:32:35 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-09 15:32:35 +0100
commitbb363c34501cca7f4233ee72ed5217e56bb8ef1e (patch)
tree843e5f74282148141273cd8dc3ad9fb4b3f60c5b
parent69c35060689ea6658d58dbe09b72b07781e3a93f (diff)
downloadpaludis-bb363c34501cca7f4233ee72ed5217e56bb8ef1e.tar.gz
paludis-bb363c34501cca7f4233ee72ed5217e56bb8ef1e.tar.xz
Faster purge code
-rw-r--r--paludis/resolver/decider.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index ca2326c..5ac83f2 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -351,7 +351,8 @@ namespace
for (typename C_::ConstIterator g(going_away->begin()), g_end(going_away->end()) ;
g != g_end ; ++g)
{
- PartiallyMadePackageDepSpec part_spec(*s.spec());
+ auto spec(s.spec());
+
if (s.spec()->slot_requirement_ptr() && simple_visitor_cast<const SlotAnyUnlockedRequirement>(
*s.spec()->slot_requirement_ptr()))
{
@@ -359,19 +360,21 @@ namespace
if (! best_eventual_id)
best_eventual_id = best_eventual(env, *s.spec(), not_changing_slots);
if (best_eventual_id && best_eventual_id->slot_key())
+ {
+ PartiallyMadePackageDepSpec part_spec(*s.spec());
part_spec.slot_requirement(std::make_shared<ELikeSlotExactRequirement>(best_eventual_id->slot_key()->value(), false));
+ spec = std::make_shared<PackageDepSpec>(part_spec);
+ }
}
- PackageDepSpec spec(part_spec);
-
- if (! match_package(*env, spec, *dependent_checker_id(*g), { }))
+ if (! match_package(*env, *spec, *dependent_checker_id(*g), { }))
continue;
bool any(false);
for (typename C_::ConstIterator n(newly_available->begin()), n_end(newly_available->end()) ;
n != n_end ; ++n)
{
- if (match_package(*env, spec, *dependent_checker_id(*n), { }))
+ if (match_package(*env, *spec, *dependent_checker_id(*n), { }))
{
any = true;
break;