aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-27 12:44:35 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-27 12:44:35 +0100
commit96c58fbf4ce38413f7c19b58936e8fe5d61de3be (patch)
treec4ef44c391de6c04e61bc8b68883eeff3b66bb1f
parent97aace110d83d415008f61c443ea813dc731ed80 (diff)
downloadpaludis-96c58fbf4ce38413f7c19b58936e8fe5d61de3be.tar.gz
paludis-96c58fbf4ce38413f7c19b58936e8fe5d61de3be.tar.xz
More contexts
-rw-r--r--paludis/resolver/nag.cc11
-rw-r--r--paludis/resolver/orderer.cc6
2 files changed, 15 insertions, 2 deletions
diff --git a/paludis/resolver/nag.cc b/paludis/resolver/nag.cc
index 9b3b423..3a25025 100644
--- a/paludis/resolver/nag.cc
+++ b/paludis/resolver/nag.cc
@@ -31,6 +31,7 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/set-impl.hh>
#include <paludis/util/member_iterator-impl.hh>
+#include <paludis/util/join.hh>
#include <paludis/serialise-impl.hh>
#include <tr1/unordered_set>
#include <tr1/unordered_map>
@@ -150,16 +151,20 @@ NAG::add_edge(const NAGIndex & a, const NAGIndex & b, const NAGEdgeProperties &
void
NAG::verify_edges() const
{
+ Context context("When verifying NAG edges:");
+
for (Edges::const_iterator e(_imp->edges.begin()), e_end(_imp->edges.end()) ;
e != e_end ; ++e)
{
if (_imp->nodes.end() == _imp->nodes.find(e->first))
- throw InternalError(PALUDIS_HERE, "Missing node for edge " + stringify(e->first));
+ throw InternalError(PALUDIS_HERE, "Missing node for edge '" + stringify(e->first) + "' in nodes { "
+ + join(_imp->nodes.begin(), _imp->nodes.end(), ", ") + " }");
for (NodesWithProperties::const_iterator f(e->second.begin()), f_end(e->second.end()) ;
f != f_end ; ++f)
if (_imp->nodes.end() == _imp->nodes.find(f->first))
- throw InternalError(PALUDIS_HERE, "Missing node for edge " + stringify(e->first) + " -> " + stringify(f->first));
+ throw InternalError(PALUDIS_HERE, "Missing node for edge '" + stringify(e->first) + "' -> '" + stringify(f->first) + "' in nodes { "
+ + join(_imp->nodes.begin(), _imp->nodes.end(), ", ") + " }");
}
}
@@ -367,6 +372,8 @@ NAG::serialise(Serialiser & s) const
const std::tr1::shared_ptr<NAG>
NAG::deserialise(Deserialisation & d)
{
+ Context context("When deserialising NAG:");
+
Deserialisator v(d, "NAG");
std::tr1::shared_ptr<NAG> result(new NAG);
diff --git a/paludis/resolver/orderer.cc b/paludis/resolver/orderer.cc
index 879d8b2..eb136df 100644
--- a/paludis/resolver/orderer.cc
+++ b/paludis/resolver/orderer.cc
@@ -382,6 +382,8 @@ namespace
void
Orderer::resolve()
{
+ Context context("When resolving ordering:");
+
_imp->env->trigger_notifier_callback(NotifierCallbackResolverStageEvent("Nodifying Decisions"));
ResolventsSet ignore_dependencies_from_resolvents, ignore_edges_from_resolvents;
@@ -459,6 +461,8 @@ Orderer::resolve()
}
else
{
+ Context sub_context("When considering only changes:");
+
/* whoop de doo. what do our SCCs look like if we only count change
* or remove nodes? */
NAG scc_nag;
@@ -498,6 +502,8 @@ Orderer::_order_sub_ssccs(
const std::tr1::shared_ptr<const SortedStronglyConnectedComponents> & sub_ssccs,
const bool can_recurse)
{
+ Context context("When ordering SSCCs" + std::string(can_recurse ? " for the first time" : " for the second time") + ":");
+
for (SortedStronglyConnectedComponents::ConstIterator sub_scc(sub_ssccs->begin()), sub_scc_end(sub_ssccs->end()) ;
sub_scc != sub_scc_end ; ++sub_scc)
{