aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-14 16:30:05 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-14 16:30:05 +0100
commita07457430ed22803a1e53cab246118ab9c3217d4 (patch)
tree2663d01528a99343558b6bb09e4eebf6306ea60f
parentbbf7f70804bedc675f8c1725842af2055fa21eee (diff)
downloadpaludis-a07457430ed22803a1e53cab246118ab9c3217d4.tar.gz
paludis-a07457430ed22803a1e53cab246118ab9c3217d4.tar.xz
Resolutions -> ResolutionsByResolvent
-rw-r--r--paludis/resolver/Makefile.am4
-rw-r--r--paludis/resolver/decider.cc60
-rw-r--r--paludis/resolver/decider.hh4
-rw-r--r--paludis/resolver/lineariser.cc10
-rw-r--r--paludis/resolver/orderer.cc6
-rw-r--r--paludis/resolver/orderer.hh1
-rw-r--r--paludis/resolver/resolutions.cc101
-rw-r--r--paludis/resolver/resolutions_by_resolvent-fwd.hh (renamed from paludis/resolver/resolutions-fwd.hh)11
-rw-r--r--paludis/resolver/resolutions_by_resolvent.cc119
-rw-r--r--paludis/resolver/resolutions_by_resolvent.hh (renamed from paludis/resolver/resolutions.hh)35
-rw-r--r--paludis/resolver/resolved.cc6
-rw-r--r--paludis/resolver/resolved.hh6
-rw-r--r--paludis/resolver/resolver.cc8
-rw-r--r--paludis/resolver/resolver.hh1
-rw-r--r--paludis/resolver/resolver_TEST_any.cc1
-rw-r--r--paludis/resolver/resolver_TEST_blockers.cc1
-rw-r--r--paludis/resolver/resolver_TEST_cycles.cc1
-rw-r--r--paludis/resolver/resolver_TEST_errors.cc1
-rw-r--r--paludis/resolver/resolver_TEST_serialisation.cc1
-rw-r--r--paludis/resolver/resolver_TEST_simple.cc1
-rw-r--r--paludis/resolver/resolver_TEST_suggestions.cc1
-rw-r--r--paludis/resolver/resolver_TEST_virtuals.cc1
-rw-r--r--paludis/resolver/resolver_lists.cc6
-rw-r--r--paludis/resolver/resolver_lists.hh6
-rw-r--r--paludis/resolver/resolver_test.cc1
-rw-r--r--paludis/resolver/resolver_test.hh1
-rw-r--r--src/clients/cave/cmd_display_resolution.cc5
-rw-r--r--src/clients/cave/cmd_execute_resolution.cc2
-rw-r--r--src/clients/cave/cmd_resolve_dump.cc6
-rw-r--r--src/clients/cave/resolve_common.cc2
30 files changed, 202 insertions, 207 deletions
diff --git a/paludis/resolver/Makefile.am b/paludis/resolver/Makefile.am
index 66e4851..fdc431e 100644
--- a/paludis/resolver/Makefile.am
+++ b/paludis/resolver/Makefile.am
@@ -43,7 +43,7 @@ noinst_HEADERS = \
reason.hh reason-fwd.hh \
required_confirmations.hh required_confirmations-fwd.hh \
resolution.hh resolution-fwd.hh \
- resolutions.hh resolutions-fwd.hh \
+ resolutions_by_resolvent.hh resolutions_by_resolvent-fwd.hh \
resolvent.hh resolvent-fwd.hh \
resolver.hh resolver-fwd.hh \
resolver_functions.hh resolver_functions-fwd.hh \
@@ -79,7 +79,7 @@ libpaludisresolver_a_SOURCES = \
reason.cc \
required_confirmations.cc \
resolution.cc \
- resolutions.cc \
+ resolutions_by_resolvent.cc \
resolvent.cc \
resolver.cc \
resolver_functions.cc \
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index b608654..95f237b 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -25,7 +25,7 @@
#include <paludis/resolver/constraint.hh>
#include <paludis/resolver/decision.hh>
#include <paludis/resolver/destination.hh>
-#include <paludis/resolver/resolutions.hh>
+#include <paludis/resolver/resolutions_by_resolvent.hh>
#include <paludis/resolver/suggest_restart.hh>
#include <paludis/resolver/reason.hh>
#include <paludis/resolver/unsuitable_candidates.hh>
@@ -65,8 +65,6 @@
using namespace paludis;
using namespace paludis::resolver;
-typedef std::map<Resolvent, std::tr1::shared_ptr<Resolution> > ResolutionsByResolventMap;
-
namespace paludis
{
template <>
@@ -76,22 +74,21 @@ namespace paludis
const ResolverFunctions fns;
SpecRewriter rewriter;
- ResolutionsByResolventMap resolutions_by_resolvent;
- const std::tr1::shared_ptr<Resolutions> all_resolutions;
+ const std::tr1::shared_ptr<ResolutionsByResolvent> resolutions_by_resolvent;
Implementation(const Environment * const e, const ResolverFunctions & f,
- const std::tr1::shared_ptr<Resolutions> & l) :
+ const std::tr1::shared_ptr<ResolutionsByResolvent> & l) :
env(e),
fns(f),
rewriter(env),
- all_resolutions(l)
+ resolutions_by_resolvent(l)
{
}
};
}
Decider::Decider(const Environment * const e, const ResolverFunctions & f,
- const std::tr1::shared_ptr<Resolutions> & l) :
+ const std::tr1::shared_ptr<ResolutionsByResolvent> & l) :
PrivateImplementationPattern<Decider>(new Implementation<Decider>(e, f, l))
{
}
@@ -115,26 +112,26 @@ Decider::_resolve_decide_with_dependencies()
break;
changed = false;
- for (ResolutionsByResolventMap::iterator i(_imp->resolutions_by_resolvent.begin()),
- i_end(_imp->resolutions_by_resolvent.end()) ;
+ for (ResolutionsByResolvent::ConstIterator i(_imp->resolutions_by_resolvent->begin()),
+ i_end(_imp->resolutions_by_resolvent->end()) ;
i != i_end ; ++i)
{
/* we've already decided */
- if (i->second->decision())
+ if ((*i)->decision())
continue;
/* we're only being suggested. don't do this on the first pass, so
* we don't have to do restarts for suggestions later becoming hard
* deps. */
- if (state == deciding_non_suggestions && i->second->constraints()->all_untaken())
+ if (state == deciding_non_suggestions && (*i)->constraints()->all_untaken())
continue;
_imp->env->trigger_notifier_callback(NotifierCallbackResolverStepEvent());
changed = true;
- _decide(i->first, i->second);
+ _decide((*i)->resolvent(), *i);
- _add_dependencies_if_necessary(i->first, i->second);
+ _add_dependencies_if_necessary((*i)->resolvent(), *i);
}
}
}
@@ -172,7 +169,7 @@ Decider::_resolve_dependents()
Resolvent resolvent(*s, dt_install_to_slash);
/* we've changed things if we've not already done anything for this resolvent */
- if (_imp->resolutions_by_resolvent.end() == _imp->resolutions_by_resolvent.find(resolvent))
+ if (_imp->resolutions_by_resolvent->end() == _imp->resolutions_by_resolvent->find(resolvent))
changed = true;
const std::tr1::shared_ptr<Resolution> resolution(_resolution_for_resolvent(resolvent, true));
@@ -340,11 +337,11 @@ Decider::_collect_changing() const
{
ChangingCollector c;
- for (ResolutionsByResolventMap::const_iterator i(_imp->resolutions_by_resolvent.begin()),
- i_end(_imp->resolutions_by_resolvent.end()) ;
+ for (ResolutionsByResolvent::ConstIterator i(_imp->resolutions_by_resolvent->begin()),
+ i_end(_imp->resolutions_by_resolvent->end()) ;
i != i_end ; ++i)
- if (i->second->decision())
- i->second->decision()->accept(c);
+ if ((*i)->decision())
+ (*i)->decision()->accept(c);
return std::make_pair(c.going_away, c.newly_available);
}
@@ -370,10 +367,10 @@ Decider::_resolve_destinations()
{
Context context("When resolving destinations:");
- for (ResolutionsByResolventMap::iterator i(_imp->resolutions_by_resolvent.begin()),
- i_end(_imp->resolutions_by_resolvent.end()) ;
+ for (ResolutionsByResolvent::ConstIterator i(_imp->resolutions_by_resolvent->begin()),
+ i_end(_imp->resolutions_by_resolvent->end()) ;
i != i_end ; ++i)
- _do_destination_if_necessary(i->first, i->second);
+ _do_destination_if_necessary((*i)->resolvent(), *i);
}
namespace
@@ -566,32 +563,31 @@ Decider::_create_resolution_for_resolvent(const Resolvent & r) const
const std::tr1::shared_ptr<Resolution>
Decider::_resolution_for_resolvent(const Resolvent & r, const bool create)
{
- ResolutionsByResolventMap::iterator i(_imp->resolutions_by_resolvent.find(r));
- if (_imp->resolutions_by_resolvent.end() == i)
+ ResolutionsByResolvent::ConstIterator i(_imp->resolutions_by_resolvent->find(r));
+ if (_imp->resolutions_by_resolvent->end() == i)
{
if (create)
{
std::tr1::shared_ptr<Resolution> resolution(_create_resolution_for_resolvent(r));
- i = _imp->resolutions_by_resolvent.insert(std::make_pair(r, resolution)).first;
- _imp->all_resolutions->append(resolution);
+ i = _imp->resolutions_by_resolvent->insert_new(resolution);
}
else
throw InternalError(PALUDIS_HERE, "resolver bug: expected resolution for "
+ stringify(r) + " to exist, but it doesn't");
}
- return i->second;
+ return *i;
}
const std::tr1::shared_ptr<Resolution>
Decider::resolution_for_resolvent(const Resolvent & r) const
{
- ResolutionsByResolventMap::const_iterator i(_imp->resolutions_by_resolvent.find(r));
- if (_imp->resolutions_by_resolvent.end() == i)
+ ResolutionsByResolvent::ConstIterator i(_imp->resolutions_by_resolvent->find(r));
+ if (_imp->resolutions_by_resolvent->end() == i)
throw InternalError(PALUDIS_HERE, "resolver bug: expected resolution for "
+ stringify(r) + " to exist, but it doesn't");
- return i->second;
+ return *i;
}
const std::tr1::shared_ptr<ConstraintSequence>
@@ -1213,8 +1209,8 @@ Decider::find_any_score(const Resolvent & our_resolvent, const SanitisedDependen
for (Resolvents::ConstIterator r(resolvents->begin()), r_end(resolvents->end()) ;
r != r_end ; ++r)
{
- ResolutionsByResolventMap::const_iterator i(_imp->resolutions_by_resolvent.find(*r));
- if (i != _imp->resolutions_by_resolvent.end())
+ ResolutionsByResolvent::ConstIterator i(_imp->resolutions_by_resolvent->find(*r));
+ if (i != _imp->resolutions_by_resolvent->end())
return std::make_pair(acs_will_be_installing, operator_bias);
}
}
diff --git a/paludis/resolver/decider.hh b/paludis/resolver/decider.hh
index ebc8727..1218e5d 100644
--- a/paludis/resolver/decider.hh
+++ b/paludis/resolver/decider.hh
@@ -31,12 +31,12 @@
#include <paludis/resolver/destination-fwd.hh>
#include <paludis/resolver/unsuitable_candidates-fwd.hh>
#include <paludis/resolver/spec_rewriter-fwd.hh>
-#include <paludis/resolver/resolutions-fwd.hh>
#include <paludis/resolver/resolver_functions-fwd.hh>
#include <paludis/resolver/resolver-fwd.hh>
#include <paludis/resolver/any_child_score-fwd.hh>
#include <paludis/resolver/change_type-fwd.hh>
#include <paludis/resolver/package_or_block_dep_spec-fwd.hh>
+#include <paludis/resolver/resolutions_by_resolvent-fwd.hh>
#include <paludis/util/attributes.hh>
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/dep_spec-fwd.hh>
@@ -220,7 +220,7 @@ namespace paludis
public:
Decider(const Environment * const,
const ResolverFunctions &,
- const std::tr1::shared_ptr<Resolutions> &);
+ const std::tr1::shared_ptr<ResolutionsByResolvent> &);
~Decider();
void resolve();
diff --git a/paludis/resolver/lineariser.cc b/paludis/resolver/lineariser.cc
index b9ae68b..ccc2b27 100644
--- a/paludis/resolver/lineariser.cc
+++ b/paludis/resolver/lineariser.cc
@@ -20,12 +20,12 @@
#include <paludis/resolver/lineariser.hh>
#include <paludis/resolver/decision.hh>
#include <paludis/resolver/decisions.hh>
-#include <paludis/resolver/resolutions.hh>
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/nag.hh>
#include <paludis/resolver/reason.hh>
#include <paludis/resolver/constraint.hh>
#include <paludis/resolver/strongly_connected_component.hh>
+#include <paludis/resolver/resolutions_by_resolvent.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/exception.hh>
#include <paludis/util/stringify.hh>
@@ -304,8 +304,8 @@ Lineariser::resolve()
_imp->env->trigger_notifier_callback(NotifierCallbackResolverStageEvent("Nodifying Decisions"));
ResolventsSet ignore_dependencies_from_resolvents, ignore_edges_from_resolvents;
- for (Resolutions::ConstIterator r(_imp->resolved->resolutions()->begin()),
- r_end(_imp->resolved->resolutions()->end()) ;
+ for (ResolutionsByResolvent::ConstIterator r(_imp->resolved->resolutions_by_resolvent()->begin()),
+ r_end(_imp->resolved->resolutions_by_resolvent()->end()) ;
r != r_end ; ++r)
{
DecisionDispatcher decision_dispatcher(
@@ -321,8 +321,8 @@ Lineariser::resolve()
_imp->env->trigger_notifier_callback(NotifierCallbackResolverStageEvent("Building NAG Edges"));
- for (Resolutions::ConstIterator r(_imp->resolved->resolutions()->begin()),
- r_end(_imp->resolved->resolutions()->end()) ;
+ for (ResolutionsByResolvent::ConstIterator r(_imp->resolved->resolutions_by_resolvent()->begin()),
+ r_end(_imp->resolved->resolutions_by_resolvent()->end()) ;
r != r_end ; ++r)
{
if (ignore_dependencies_from_resolvents.end() != ignore_edges_from_resolvents.find((*r)->resolvent()))
diff --git a/paludis/resolver/orderer.cc b/paludis/resolver/orderer.cc
index 4af4da9..29b5c78 100644
--- a/paludis/resolver/orderer.cc
+++ b/paludis/resolver/orderer.cc
@@ -25,7 +25,7 @@
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/arrow.hh>
#include <paludis/resolver/decision.hh>
-#include <paludis/resolver/resolutions.hh>
+#include <paludis/resolver/resolutions_by_resolvent.hh>
#include <paludis/resolver/resolver.hh>
#include <paludis/resolver/resolver_lists.hh>
#include <paludis/resolver/job.hh>
@@ -276,8 +276,8 @@ namespace
void
Orderer::_resolve_jobs()
{
- for (Resolutions::ConstIterator i(_imp->lists->all_resolutions()->begin()),
- i_end(_imp->lists->all_resolutions()->end()) ;
+ for (ResolutionsByResolvent::ConstIterator i(_imp->lists->resolutions_by_resolvent()->begin()),
+ i_end(_imp->lists->resolutions_by_resolvent()->end()) ;
i != i_end ; ++i)
{
DecisionHandler d(*i, _imp->lists, _imp->to_order, std::tr1::bind(
diff --git a/paludis/resolver/orderer.hh b/paludis/resolver/orderer.hh
index 76a8a60..77dc0f7 100644
--- a/paludis/resolver/orderer.hh
+++ b/paludis/resolver/orderer.hh
@@ -23,7 +23,6 @@
#include <paludis/resolver/orderer-fwd.hh>
#include <paludis/resolver/resolvent-fwd.hh>
#include <paludis/resolver/resolution-fwd.hh>
-#include <paludis/resolver/resolutions-fwd.hh>
#include <paludis/resolver/constraint-fwd.hh>
#include <paludis/resolver/reason-fwd.hh>
#include <paludis/resolver/resolver_functions-fwd.hh>
diff --git a/paludis/resolver/resolutions.cc b/paludis/resolver/resolutions.cc
deleted file mode 100644
index dfa99a1..0000000
--- a/paludis/resolver/resolutions.cc
+++ /dev/null
@@ -1,101 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2009 Ciaran McCreesh
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <paludis/resolver/resolutions.hh>
-#include <paludis/resolver/resolution.hh>
-#include <paludis/util/wrapped_forward_iterator-impl.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/sequence-impl.hh>
-#include <paludis/util/stringify.hh>
-#include <paludis/util/make_named_values.hh>
-#include <paludis/serialise-impl.hh>
-
-using namespace paludis;
-using namespace paludis::resolver;
-
-namespace paludis
-{
- template <>
- struct Implementation<Resolutions>
- {
- Sequence<std::tr1::shared_ptr<Resolution> > resolutions;
- };
-
- template <>
- struct WrappedForwardIteratorTraits<Resolutions::ConstIteratorTag>
- {
- typedef Sequence<std::tr1::shared_ptr<Resolution> >::ConstIterator UnderlyingIterator;
- };
-}
-
-Resolutions::Resolutions() :
- PrivateImplementationPattern<Resolutions>(new Implementation<Resolutions>)
-{
-}
-
-Resolutions::~Resolutions()
-{
-}
-
-void
-Resolutions::append(const std::tr1::shared_ptr<Resolution> & r)
-{
- _imp->resolutions.push_back(r);
-}
-
-Resolutions::ConstIterator
-Resolutions::begin() const
-{
- return ConstIterator(_imp->resolutions.begin());
-}
-
-Resolutions::ConstIterator
-Resolutions::end() const
-{
- return ConstIterator(_imp->resolutions.end());
-}
-
-bool
-Resolutions::empty() const
-{
- return begin() == end();
-}
-
-void
-Resolutions::serialise(Serialiser & s) const
-{
- s.object("Resolutions")
- .member(SerialiserFlags<serialise::container>(), "items", _imp->resolutions)
- ;
-}
-
-const std::tr1::shared_ptr<Resolutions>
-Resolutions::deserialise(Deserialisation & d)
-{
- Deserialisator v(d, "Resolutions");
- Deserialisator vv(*v.find_remove_member("items"), "c");
- std::tr1::shared_ptr<Resolutions> result(new Resolutions);
- for (int n(1), n_end(vv.member<int>("count") + 1) ; n != n_end ; ++n)
- result->append(vv.member<std::tr1::shared_ptr<Resolution> >(stringify(n)));
- return result;
-}
-
-template class PrivateImplementationPattern<Resolutions>;
-template class WrappedForwardIterator<Resolutions::ConstIteratorTag, const std::tr1::shared_ptr<Resolution> >;
-
diff --git a/paludis/resolver/resolutions-fwd.hh b/paludis/resolver/resolutions_by_resolvent-fwd.hh
index 801e57f..d75f9fd 100644
--- a/paludis/resolver/resolutions-fwd.hh
+++ b/paludis/resolver/resolutions_by_resolvent-fwd.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2009 Ciaran McCreesh
+ * Copyright (c) 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -17,17 +17,14 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef PALUDIS_GUARD_PALUDIS_RESOLVER_RESOLUTIONS_FWD_HH
-#define PALUDIS_GUARD_PALUDIS_RESOLVER_RESOLUTIONS_FWD_HH 1
-
-#include <paludis/util/attributes.hh>
-#include <paludis/serialise-fwd.hh>
+#ifndef PALUDIS_GUARD_PALUDIS_RESOLVER_RESOLUTIONS_BY_RESOLVENT_FWD_HH
+#define PALUDIS_GUARD_PALUDIS_RESOLVER_RESOLUTIONS_BY_RESOLVENT_FWD_HH 1
namespace paludis
{
namespace resolver
{
- struct Resolutions;
+ struct ResolutionsByResolvent;
}
}
diff --git a/paludis/resolver/resolutions_by_resolvent.cc b/paludis/resolver/resolutions_by_resolvent.cc
new file mode 100644
index 0000000..af8d118
--- /dev/null
+++ b/paludis/resolver/resolutions_by_resolvent.cc
@@ -0,0 +1,119 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2010 Ciaran McCreesh
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <paludis/resolver/resolutions_by_resolvent.hh>
+#include <paludis/resolver/resolvent.hh>
+#include <paludis/resolver/resolution.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/wrapped_forward_iterator-impl.hh>
+#include <paludis/util/hashes.hh>
+#include <paludis/util/exception.hh>
+#include <paludis/util/stringify.hh>
+#include <paludis/serialise-impl.hh>
+#include <list>
+#include <tr1/unordered_map>
+
+using namespace paludis;
+using namespace paludis::resolver;
+
+// we need iterators to remain valid after an insert, but we also need fast
+// lookups.
+typedef std::list<std::tr1::shared_ptr<Resolution> > ResolutionList;
+typedef std::tr1::unordered_map<Resolvent, ResolutionList::const_iterator, Hash<Resolvent> > ResolutionListIndex;
+
+namespace paludis
+{
+ template <>
+ struct Implementation<ResolutionsByResolvent>
+ {
+ ResolutionList resolution_list;
+ ResolutionListIndex resolution_list_index;
+ };
+
+ template <>
+ struct WrappedForwardIteratorTraits<ResolutionsByResolvent::ConstIteratorTag>
+ {
+ typedef std::list<std::tr1::shared_ptr<Resolution> >::const_iterator UnderlyingIterator;
+ };
+}
+
+ResolutionsByResolvent::ResolutionsByResolvent() :
+ PrivateImplementationPattern<ResolutionsByResolvent>(new Implementation<ResolutionsByResolvent>)
+{
+}
+
+ResolutionsByResolvent::~ResolutionsByResolvent()
+{
+}
+
+ResolutionsByResolvent::ConstIterator
+ResolutionsByResolvent::begin() const
+{
+ return ConstIterator(_imp->resolution_list.begin());
+}
+
+ResolutionsByResolvent::ConstIterator
+ResolutionsByResolvent::end() const
+{
+ return ConstIterator(_imp->resolution_list.end());
+}
+
+ResolutionsByResolvent::ConstIterator
+ResolutionsByResolvent::find(const Resolvent & r) const
+{
+ ResolutionListIndex::const_iterator x(_imp->resolution_list_index.find(r));
+ if (x == _imp->resolution_list_index.end())
+ return end();
+ else
+ return ConstIterator(x->second);
+}
+
+ResolutionsByResolvent::ConstIterator
+ResolutionsByResolvent::insert_new(const std::tr1::shared_ptr<Resolution> & r)
+{
+ ResolutionList::iterator i(_imp->resolution_list.insert(_imp->resolution_list.end(), r));
+ if (! _imp->resolution_list_index.insert(std::make_pair(r->resolvent(), i)).second)
+ {
+ _imp->resolution_list.erase(i);
+ throw InternalError(PALUDIS_HERE, "duplicate resolution");
+ }
+ return ConstIterator(i);
+}
+
+void
+ResolutionsByResolvent::serialise(Serialiser & s) const
+{
+ s.object("ResolutionsByResolvent")
+ .member(SerialiserFlags<serialise::container>(), "items", _imp->resolution_list)
+ ;
+}
+
+const std::tr1::shared_ptr<ResolutionsByResolvent>
+ResolutionsByResolvent::deserialise(Deserialisation & d)
+{
+ Deserialisator v(d, "ResolutionsByResolvent");
+ Deserialisator vv(*v.find_remove_member("items"), "c");
+ std::tr1::shared_ptr<ResolutionsByResolvent> result(new ResolutionsByResolvent);
+ for (int n(1), n_end(vv.member<int>("count") + 1) ; n != n_end ; ++n)
+ result->insert_new(vv.member<std::tr1::shared_ptr<Resolution> >(stringify(n)));
+ return result;
+}
+
+template class WrappedForwardIterator<ResolutionsByResolvent::ConstIteratorTag, const std::tr1::shared_ptr<Resolution> >;
+
diff --git a/paludis/resolver/resolutions.hh b/paludis/resolver/resolutions_by_resolvent.hh
index 5e865ef..98f4b26 100644
--- a/paludis/resolver/resolutions.hh
+++ b/paludis/resolver/resolutions_by_resolvent.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -17,50 +17,45 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef PALUDIS_GUARD_PALUDIS_RESOLVER_RESOLUTIONS_HH
-#define PALUDIS_GUARD_PALUDIS_RESOLVER_RESOLUTIONS_HH 1
+#ifndef PALUDIS_GUARD_PALUDIS_RESOLVER_RESOLUTIONS_BY_RESOLVENT_HH
+#define PALUDIS_GUARD_PALUDIS_RESOLVER_RESOLUTIONS_BY_RESOLVENT_HH 1
-#include <paludis/resolver/resolutions-fwd.hh>
+#include <paludis/resolver/resolutions_by_resolvent-fwd.hh>
#include <paludis/resolver/resolution-fwd.hh>
+#include <paludis/resolver/resolvent-fwd.hh>
#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/util/attributes.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/named_value.hh>
+#include <paludis/serialise-fwd.hh>
#include <tr1/memory>
namespace paludis
{
namespace resolver
{
- class PALUDIS_VISIBLE Resolutions :
- private PrivateImplementationPattern<Resolutions>
+ class PALUDIS_VISIBLE ResolutionsByResolvent :
+ private PrivateImplementationPattern<ResolutionsByResolvent>
{
public:
- Resolutions();
- ~Resolutions();
-
- void append(const std::tr1::shared_ptr<Resolution> &);
+ ResolutionsByResolvent();
+ ~ResolutionsByResolvent();
struct ConstIteratorTag;
- typedef WrappedForwardIterator<ConstIteratorTag,
- const std::tr1::shared_ptr<Resolution> > ConstIterator;
+ typedef WrappedForwardIterator<ConstIteratorTag, const std::tr1::shared_ptr<Resolution> > ConstIterator;
ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator find(const Resolvent &) const PALUDIS_ATTRIBUTE((warn_unused_result));
- bool empty() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ ConstIterator insert_new(const std::tr1::shared_ptr<Resolution> &);
void serialise(Serialiser &) const;
- static const std::tr1::shared_ptr<Resolutions> deserialise(
+ static const std::tr1::shared_ptr<ResolutionsByResolvent> deserialise(
Deserialisation & d) PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
-#ifdef PALUDIS_HAVE_EXTERN_TEMPLATE
- extern template class PrivateImplementationPattern<resolver::Resolutions>;
- extern template class WrappedForwardIterator<resolver::Resolutions::ConstIteratorTag,
+ extern template class WrappedForwardIterator<resolver::ResolutionsByResolvent::ConstIteratorTag,
const std::tr1::shared_ptr<resolver::Resolution> >;
-#endif
}
#endif
diff --git a/paludis/resolver/resolved.cc b/paludis/resolver/resolved.cc
index b60f96d..0be519a 100644
--- a/paludis/resolver/resolved.cc
+++ b/paludis/resolver/resolved.cc
@@ -20,7 +20,7 @@
#include <paludis/resolver/resolved.hh>
#include <paludis/resolver/decisions.hh>
#include <paludis/resolver/decision.hh>
-#include <paludis/resolver/resolutions.hh>
+#include <paludis/resolver/resolutions_by_resolvent.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/serialise-impl.hh>
@@ -32,7 +32,7 @@ Resolved::serialise(Serialiser & s) const
{
s.object("Resolved")
.member(SerialiserFlags<serialise::container, serialise::might_be_null>(), "display_change_or_remove_decisions", display_change_or_remove_decisions())
- .member(SerialiserFlags<serialise::might_be_null>(), "resolutions", resolutions())
+ .member(SerialiserFlags<serialise::might_be_null>(), "resolutions_by_resolvent", resolutions_by_resolvent())
.member(SerialiserFlags<serialise::container, serialise::might_be_null>(), "taken_unable_to_make_decisions", taken_unable_to_make_decisions())
.member(SerialiserFlags<serialise::container, serialise::might_be_null>(), "untaken_change_or_remove_decisions", untaken_change_or_remove_decisions())
.member(SerialiserFlags<serialise::container, serialise::might_be_null>(), "untaken_unable_to_make_decisions", untaken_unable_to_make_decisions())
@@ -74,7 +74,7 @@ Resolved::deserialise(Deserialisation & d)
return make_named_values<Resolved>(
n::display_change_or_remove_decisions() = display_change_or_remove_decisions,
- n::resolutions() = v.member<std::tr1::shared_ptr<Resolutions> >("resolutions"),
+ n::resolutions_by_resolvent() = v.member<std::tr1::shared_ptr<ResolutionsByResolvent> >("resolutions_by_resolvent"),
n::taken_unable_to_make_decisions() = taken_unable_to_make_decisions,
n::untaken_change_or_remove_decisions() = untaken_change_or_remove_decisions,
n::untaken_unable_to_make_decisions() = untaken_unable_to_make_decisions
diff --git a/paludis/resolver/resolved.hh b/paludis/resolver/resolved.hh
index bbce613..607c2c1 100644
--- a/paludis/resolver/resolved.hh
+++ b/paludis/resolver/resolved.hh
@@ -22,7 +22,7 @@
#include <paludis/resolver/resolved-fwd.hh>
#include <paludis/resolver/decisions-fwd.hh>
-#include <paludis/resolver/resolutions-fwd.hh>
+#include <paludis/resolver/resolutions_by_resolvent-fwd.hh>
#include <paludis/resolver/decision-fwd.hh>
#include <paludis/util/named_value.hh>
#include <paludis/serialise-fwd.hh>
@@ -33,7 +33,7 @@ namespace paludis
namespace n
{
typedef Name<struct display_change_or_remove_decisions_name> display_change_or_remove_decisions;
- typedef Name<struct resolutions_name> resolutions;
+ typedef Name<struct resolutions_by_resolvent_name> resolutions_by_resolvent;
typedef Name<struct taken_unable_to_make_decisions_name> taken_unable_to_make_decisions;
typedef Name<struct untaken_change_or_remove_decisions_name> untaken_change_or_remove_decisions;
typedef Name<struct untaken_unable_to_make_decisions_name> untaken_unable_to_make_decisions;
@@ -44,7 +44,7 @@ namespace paludis
struct Resolved
{
NamedValue<n::display_change_or_remove_decisions, std::tr1::shared_ptr<Decisions<ChangeOrRemoveDecision> > > display_change_or_remove_decisions;
- NamedValue<n::resolutions, std::tr1::shared_ptr<Resolutions> > resolutions;
+ NamedValue<n::resolutions_by_resolvent, std::tr1::shared_ptr<ResolutionsByResolvent> > resolutions_by_resolvent;
NamedValue<n::taken_unable_to_make_decisions, std::tr1::shared_ptr<Decisions<UnableToMakeDecision> > > taken_unable_to_make_decisions;
NamedValue<n::untaken_change_or_remove_decisions, std::tr1::shared_ptr<Decisions<ChangeOrRemoveDecision> > > untaken_change_or_remove_decisions;
NamedValue<n::untaken_unable_to_make_decisions, std::tr1::shared_ptr<Decisions<UnableToMakeDecision> > > untaken_unable_to_make_decisions;
diff --git a/paludis/resolver/resolver.cc b/paludis/resolver/resolver.cc
index 32d0e42..9315080 100644
--- a/paludis/resolver/resolver.cc
+++ b/paludis/resolver/resolver.cc
@@ -24,7 +24,7 @@
#include <paludis/resolver/decider.hh>
#include <paludis/resolver/sanitised_dependencies.hh>
#include <paludis/resolver/reason.hh>
-#include <paludis/resolver/resolutions.hh>
+#include <paludis/resolver/resolutions_by_resolvent.hh>
#include <paludis/resolver/jobs.hh>
#include <paludis/resolver/job_id.hh>
#include <paludis/resolver/orderer.hh>
@@ -67,9 +67,9 @@ namespace paludis
env(e),
fns(f),
lists(new ResolverLists(make_named_values<ResolverLists>(
- n::all_resolutions() = make_shared_ptr(new Resolutions),
n::job_ids_needing_confirmation() = make_shared_ptr(new JobIDSequence),
n::jobs() = make_shared_ptr(new Jobs),
+ n::resolutions_by_resolvent() = make_shared_ptr(new ResolutionsByResolvent),
n::taken_error_job_ids() = make_shared_ptr(new JobIDSequence),
n::taken_job_ids() = make_shared_ptr(new JobIDSequence),
n::untaken_error_job_ids() = make_shared_ptr(new JobIDSequence),
@@ -77,12 +77,12 @@ namespace paludis
))),
resolved(new Resolved(make_named_values<Resolved>(
n::display_change_or_remove_decisions() = make_shared_ptr(new Decisions<ChangeOrRemoveDecision>),
- n::resolutions() = lists->all_resolutions(),
+ n::resolutions_by_resolvent() = lists->resolutions_by_resolvent(),
n::taken_unable_to_make_decisions() = make_shared_ptr(new Decisions<UnableToMakeDecision>),
n::untaken_change_or_remove_decisions() = make_shared_ptr(new Decisions<ChangeOrRemoveDecision>),
n::untaken_unable_to_make_decisions() = make_shared_ptr(new Decisions<UnableToMakeDecision>)
))),
- decider(new Decider(e, f, resolved->resolutions())),
+ decider(new Decider(e, f, resolved->resolutions_by_resolvent())),
orderer(new Orderer(e, f, decider, lists)),
lineariser(new Lineariser(e, resolved))
{
diff --git a/paludis/resolver/resolver.hh b/paludis/resolver/resolver.hh
index d1942e0..3818111 100644
--- a/paludis/resolver/resolver.hh
+++ b/paludis/resolver/resolver.hh
@@ -24,7 +24,6 @@
#include <paludis/resolver/reason-fwd.hh>
#include <paludis/resolver/resolver_functions-fwd.hh>
#include <paludis/resolver/decider-fwd.hh>
-#include <paludis/resolver/resolutions-fwd.hh>
#include <paludis/resolver/resolver_lists-fwd.hh>
#include <paludis/resolver/resolved-fwd.hh>
#include <paludis/resolver/sanitised_dependencies-fwd.hh>
diff --git a/paludis/resolver/resolver_TEST_any.cc b/paludis/resolver/resolver_TEST_any.cc
index 1a69eb4..eb4e03a 100644
--- a/paludis/resolver/resolver_TEST_any.cc
+++ b/paludis/resolver/resolver_TEST_any.cc
@@ -22,7 +22,6 @@
#include <paludis/resolver/resolver_functions.hh>
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/decision.hh>
-#include <paludis/resolver/resolutions.hh>
#include <paludis/resolver/constraint.hh>
#include <paludis/resolver/resolvent.hh>
#include <paludis/resolver/suggest_restart.hh>
diff --git a/paludis/resolver/resolver_TEST_blockers.cc b/paludis/resolver/resolver_TEST_blockers.cc
index dd7a2c5..38539b8 100644
--- a/paludis/resolver/resolver_TEST_blockers.cc
+++ b/paludis/resolver/resolver_TEST_blockers.cc
@@ -21,7 +21,6 @@
#include <paludis/resolver/resolver_functions.hh>
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/decision.hh>
-#include <paludis/resolver/resolutions.hh>
#include <paludis/resolver/constraint.hh>
#include <paludis/resolver/resolvent.hh>
#include <paludis/resolver/suggest_restart.hh>
diff --git a/paludis/resolver/resolver_TEST_cycles.cc b/paludis/resolver/resolver_TEST_cycles.cc
index 74614e8..7770777 100644
--- a/paludis/resolver/resolver_TEST_cycles.cc
+++ b/paludis/resolver/resolver_TEST_cycles.cc
@@ -21,7 +21,6 @@
#include <paludis/resolver/resolver_functions.hh>
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/decision.hh>
-#include <paludis/resolver/resolutions.hh>
#include <paludis/resolver/constraint.hh>
#include <paludis/resolver/resolvent.hh>
#include <paludis/resolver/suggest_restart.hh>
diff --git a/paludis/resolver/resolver_TEST_errors.cc b/paludis/resolver/resolver_TEST_errors.cc
index 1acaa4d..3e71e75 100644
--- a/paludis/resolver/resolver_TEST_errors.cc
+++ b/paludis/resolver/resolver_TEST_errors.cc
@@ -21,7 +21,6 @@
#include <paludis/resolver/resolver_functions.hh>
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/decision.hh>
-#include <paludis/resolver/resolutions.hh>
#include <paludis/resolver/constraint.hh>
#include <paludis/resolver/resolvent.hh>
#include <paludis/resolver/suggest_restart.hh>
diff --git a/paludis/resolver/resolver_TEST_serialisation.cc b/paludis/resolver/resolver_TEST_serialisation.cc
index fc479fd..066f4f0 100644
--- a/paludis/resolver/resolver_TEST_serialisation.cc
+++ b/paludis/resolver/resolver_TEST_serialisation.cc
@@ -21,7 +21,6 @@
#include <paludis/resolver/resolver_functions.hh>
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/decision.hh>
-#include <paludis/resolver/resolutions.hh>
#include <paludis/resolver/constraint.hh>
#include <paludis/resolver/resolvent.hh>
#include <paludis/resolver/suggest_restart.hh>
diff --git a/paludis/resolver/resolver_TEST_simple.cc b/paludis/resolver/resolver_TEST_simple.cc
index 3634f65..e12a5d0 100644
--- a/paludis/resolver/resolver_TEST_simple.cc
+++ b/paludis/resolver/resolver_TEST_simple.cc
@@ -21,7 +21,6 @@
#include <paludis/resolver/resolver_functions.hh>
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/decision.hh>
-#include <paludis/resolver/resolutions.hh>
#include <paludis/resolver/constraint.hh>
#include <paludis/resolver/resolvent.hh>
#include <paludis/resolver/suggest_restart.hh>
diff --git a/paludis/resolver/resolver_TEST_suggestions.cc b/paludis/resolver/resolver_TEST_suggestions.cc
index 6875f58..66ef034 100644
--- a/paludis/resolver/resolver_TEST_suggestions.cc
+++ b/paludis/resolver/resolver_TEST_suggestions.cc
@@ -21,7 +21,6 @@
#include <paludis/resolver/resolver_functions.hh>
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/decision.hh>
-#include <paludis/resolver/resolutions.hh>
#include <paludis/resolver/constraint.hh>
#include <paludis/resolver/resolvent.hh>
#include <paludis/resolver/suggest_restart.hh>
diff --git a/paludis/resolver/resolver_TEST_virtuals.cc b/paludis/resolver/resolver_TEST_virtuals.cc
index 3959830..c8ead8a 100644
--- a/paludis/resolver/resolver_TEST_virtuals.cc
+++ b/paludis/resolver/resolver_TEST_virtuals.cc
@@ -21,7 +21,6 @@
#include <paludis/resolver/resolver_functions.hh>
#include <paludis/resolver/resolution.hh>
#include <paludis/resolver/decision.hh>
-#include <paludis/resolver/resolutions.hh>
#include <paludis/resolver/constraint.hh>
#include <paludis/resolver/resolvent.hh>
#include <paludis/resolver/suggest_restart.hh>
diff --git a/paludis/resolver/resolver_lists.cc b/paludis/resolver/resolver_lists.cc
index e5752b3..3878ee1 100644
--- a/paludis/resolver/resolver_lists.cc
+++ b/paludis/resolver/resolver_lists.cc
@@ -18,7 +18,7 @@
*/
#include <paludis/resolver/resolver_lists.hh>
-#include <paludis/resolver/resolutions.hh>
+#include <paludis/resolver/resolutions_by_resolvent.hh>
#include <paludis/resolver/jobs.hh>
#include <paludis/resolver/job_id.hh>
#include <paludis/util/sequence.hh>
@@ -33,9 +33,9 @@ void
ResolverLists::serialise(Serialiser & s) const
{
s.object("ResolverLists")
- .member(SerialiserFlags<serialise::might_be_null>(), "all_resolutions", all_resolutions())
.member(SerialiserFlags<serialise::might_be_null>(), "jobs", jobs())
.member(SerialiserFlags<serialise::container, serialise::might_be_null>(), "job_ids_needing_confirmation", job_ids_needing_confirmation())
+ .member(SerialiserFlags<serialise::might_be_null>(), "resolutions_by_resolvent", resolutions_by_resolvent())
.member(SerialiserFlags<serialise::container, serialise::might_be_null>(), "taken_error_job_ids", taken_error_job_ids())
.member(SerialiserFlags<serialise::container, serialise::might_be_null>(), "taken_job_ids", taken_job_ids())
.member(SerialiserFlags<serialise::container, serialise::might_be_null>(), "untaken_error_job_ids", untaken_error_job_ids())
@@ -84,9 +84,9 @@ ResolverLists::deserialise(Deserialisation & d)
}
return make_named_values<ResolverLists>(
- n::all_resolutions() = v.member<std::tr1::shared_ptr<Resolutions> >("all_resolutions"),
n::job_ids_needing_confirmation() = job_ids_needing_confirmation,
n::jobs() = v.member<std::tr1::shared_ptr<Jobs> >("jobs"),
+ n::resolutions_by_resolvent() = v.member<std::tr1::shared_ptr<ResolutionsByResolvent> >("resolutions_by_resolvent"),
n::taken_error_job_ids() = taken_error_job_ids,
n::taken_job_ids() = taken_job_ids,
n::untaken_error_job_ids() = untaken_error_job_ids,
diff --git a/paludis/resolver/resolver_lists.hh b/paludis/resolver/resolver_lists.hh
index 75b913e..bfa0740 100644
--- a/paludis/resolver/resolver_lists.hh
+++ b/paludis/resolver/resolver_lists.hh
@@ -21,9 +21,9 @@
#define PALUDIS_GUARD_PALUDIS_RESOLVER_RESOLVER_LISTS_HH 1
#include <paludis/resolver/resolver_lists-fwd.hh>
-#include <paludis/resolver/resolutions-fwd.hh>
#include <paludis/resolver/job_id-fwd.hh>
#include <paludis/resolver/jobs-fwd.hh>
+#include <paludis/resolver/resolutions_by_resolvent-fwd.hh>
#include <paludis/util/named_value.hh>
#include <paludis/serialise.hh>
#include <tr1/memory>
@@ -32,9 +32,9 @@ namespace paludis
{
namespace n
{
- typedef Name<struct all_resolutions_name> all_resolutions;
typedef Name<struct job_ids_needing_confirmation_name> job_ids_needing_confirmation;
typedef Name<struct jobs_name> jobs;
+ typedef Name<struct resolutions_by_resolvent_name> resolutions_by_resolvent;
typedef Name<struct taken_error_job_ids_name> taken_error_job_ids;
typedef Name<struct taken_job_ids_name> taken_job_ids;
typedef Name<struct untaken_error_job_ids_name> untaken_error_job_ids;
@@ -45,9 +45,9 @@ namespace paludis
{
struct ResolverLists
{
- NamedValue<n::all_resolutions, std::tr1::shared_ptr<Resolutions> > all_resolutions;
NamedValue<n::job_ids_needing_confirmation, std::tr1::shared_ptr<JobIDSequence> > job_ids_needing_confirmation;
NamedValue<n::jobs, std::tr1::shared_ptr<Jobs> > jobs;
+ NamedValue<n::resolutions_by_resolvent, std::tr1::shared_ptr<ResolutionsByResolvent> > resolutions_by_resolvent;
NamedValue<n::taken_error_job_ids, std::tr1::shared_ptr<JobIDSequence> > taken_error_job_ids;
NamedValue<n::taken_job_ids, std::tr1::shared_ptr<JobIDSequence> > taken_job_ids;
NamedValue<n::untaken_error_job_ids, std::tr1::shared_ptr<JobIDSequence> > untaken_error_job_ids;
diff --git a/paludis/resolver/resolver_test.cc b/paludis/resolver/resolver_test.cc
index 5a45ae9..c7c0fa4 100644
--- a/paludis/resolver/resolver_test.cc
+++ b/paludis/resolver/resolver_test.cc
@@ -22,7 +22,6 @@
#include <paludis/resolver/resolvent.hh>
#include <paludis/resolver/resolver.hh>
#include <paludis/resolver/resolution.hh>
-#include <paludis/resolver/resolutions.hh>
#include <paludis/resolver/resolver_functions.hh>
#include <paludis/resolver/suggest_restart.hh>
#include <paludis/resolver/decision.hh>
diff --git a/paludis/resolver/resolver_test.hh b/paludis/resolver/resolver_test.hh
index 5b1a4f6..b4b5b4a 100644
--- a/paludis/resolver/resolver_test.hh
+++ b/paludis/resolver/resolver_test.hh
@@ -26,7 +26,6 @@
#include <paludis/resolver/sanitised_dependencies-fwd.hh>
#include <paludis/resolver/reason-fwd.hh>
#include <paludis/resolver/use_existing-fwd.hh>
-#include <paludis/resolver/resolutions-fwd.hh>
#include <paludis/resolver/decision-fwd.hh>
#include <paludis/resolver/destination_types-fwd.hh>
#include <paludis/resolver/resolver-fwd.hh>
diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc
index 693d0ed..804eaca 100644
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -40,7 +40,7 @@
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/log.hh>
#include <paludis/util/pretty_print.hh>
-#include <paludis/resolver/resolutions.hh>
+#include <paludis/resolver/resolutions_by_resolvent.hh>
#include <paludis/resolver/reason.hh>
#include <paludis/resolver/sanitised_dependencies.hh>
#include <paludis/resolver/resolution.hh>
@@ -414,7 +414,8 @@ namespace
{
bool any(false);
PackageDepSpec spec(parse_user_package_dep_spec(*i, env.get(), UserPackageDepSpecOptions() + updso_allow_wildcards));
- for (Resolutions::ConstIterator r(lists.all_resolutions()->begin()), r_end(lists.all_resolutions()->end()) ;
+ for (ResolutionsByResolvent::ConstIterator r(lists.resolutions_by_resolvent()->begin()),
+ r_end(lists.resolutions_by_resolvent()->end()) ;
r != r_end ; ++r)
{
if (! decision_matches_spec(env, (*r)->resolvent(), *(*r)->decision(), spec))
diff --git a/src/clients/cave/cmd_execute_resolution.cc b/src/clients/cave/cmd_execute_resolution.cc
index 26a689f..758714d 100644
--- a/src/clients/cave/cmd_execute_resolution.cc
+++ b/src/clients/cave/cmd_execute_resolution.cc
@@ -40,7 +40,7 @@
#include <paludis/util/make_shared_copy.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/type_list.hh>
-#include <paludis/resolver/resolutions.hh>
+#include <paludis/resolver/resolutions_by_resolvent.hh>
#include <paludis/resolver/reason.hh>
#include <paludis/resolver/sanitised_dependencies.hh>
#include <paludis/resolver/resolution.hh>
diff --git a/src/clients/cave/cmd_resolve_dump.cc b/src/clients/cave/cmd_resolve_dump.cc
index caf5a80..df8b9fe 100644
--- a/src/clients/cave/cmd_resolve_dump.cc
+++ b/src/clients/cave/cmd_resolve_dump.cc
@@ -27,7 +27,7 @@
#include <paludis/resolver/reason.hh>
#include <paludis/resolver/arrow.hh>
#include <paludis/resolver/destination.hh>
-#include <paludis/resolver/resolutions.hh>
+#include <paludis/resolver/resolutions_by_resolvent.hh>
#include <paludis/resolver/resolver_lists.hh>
#include <paludis/util/enum_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
@@ -237,8 +237,8 @@ namespace
{
std::cout << "Dumping resolutions by QPN:S:" << std::endl << std::endl;
- for (Resolutions::ConstIterator c(resolver->lists()->all_resolutions()->begin()),
- c_end(resolver->lists()->all_resolutions()->end()) ;
+ for (ResolutionsByResolvent::ConstIterator c(resolver->lists()->resolutions_by_resolvent()->begin()),
+ c_end(resolver->lists()->resolutions_by_resolvent()->end()) ;
c != c_end ; ++c)
{
std::cout << (*c)->resolvent() << std::endl;
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 8364e77..38df796 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -50,7 +50,7 @@
#include <paludis/resolver/resolvent.hh>
#include <paludis/resolver/constraint.hh>
#include <paludis/resolver/sanitised_dependencies.hh>
-#include <paludis/resolver/resolutions.hh>
+#include <paludis/resolver/resolutions_by_resolvent.hh>
#include <paludis/resolver/resolver_lists.hh>
#include <paludis/resolver/required_confirmations.hh>
#include <paludis/user_dep_spec.hh>