aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-27 19:19:46 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-27 19:19:46 +0000
commitf37072df0cbd9bf0a2d3ad670728e1238ea243db (patch)
tree729921d6f3ea60a250c6ad36e1b5c8b46381e3e1
parent0b835816e1abc8be8c0c1a8a948eaf7594e6d5e6 (diff)
downloadpaludis-f37072df0cbd9bf0a2d3ad670728e1238ea243db.tar.gz
paludis-f37072df0cbd9bf0a2d3ad670728e1238ea243db.tar.xz
Contextify more
-rw-r--r--paludis/resolver/collect_installed.cc4
-rw-r--r--paludis/resolver/collect_provided.cc3
-rw-r--r--paludis/resolver/decider.cc14
-rw-r--r--paludis/resolver/get_initial_constraints_for_helper.cc2
-rw-r--r--paludis/resolver/get_resolvents_for_helper.cc2
-rw-r--r--paludis/resolver/get_use_existing_nothing_helper.cc2
-rw-r--r--paludis/resolver/interest_in_spec_helper.cc2
-rw-r--r--paludis/resolver/spec_rewriter.cc2
8 files changed, 29 insertions, 2 deletions
diff --git a/paludis/resolver/collect_installed.cc b/paludis/resolver/collect_installed.cc
index ea8d2a6..2b94800 100644
--- a/paludis/resolver/collect_installed.cc
+++ b/paludis/resolver/collect_installed.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 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
@@ -36,6 +36,8 @@ paludis::resolver::collect_installed(
const Environment * const env
)
{
+ Context context("When collecting installed packages:");
+
const std::shared_ptr<const PackageIDSequence> q((*env)[selection::AllVersionsUnsorted(
generator::All() | filter::InstalledAtRoot(env->system_root_key()->value()))]);
const std::shared_ptr<PackageIDSet> result(std::make_shared<PackageIDSet>());
diff --git a/paludis/resolver/collect_provided.cc b/paludis/resolver/collect_provided.cc
index a0d0235..a9c741e 100644
--- a/paludis/resolver/collect_provided.cc
+++ b/paludis/resolver/collect_provided.cc
@@ -20,6 +20,7 @@
#include <paludis/resolver/collect_provided.hh>
#include <paludis/util/set.hh>
#include <paludis/util/wrapped_output_iterator.hh>
+#include <paludis/util/stringify.hh>
#include <paludis/dep_spec_flattener.hh>
#include <paludis/package_id.hh>
#include <paludis/metadata_key.hh>
@@ -39,6 +40,8 @@ paludis::resolver::collect_provided(
const Environment * const env,
const std::shared_ptr<const PackageID> & id)
{
+ Context context("When collecting packages provided by '" + stringify(*id) + "':");
+
const std::shared_ptr<PackageIDSet> result(std::make_shared<PackageIDSet>());
if (id->provide_key())
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index 5cd3187..200ec8a 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -399,6 +399,8 @@ namespace
const std::shared_ptr<const PackageIDSequence>
Decider::_collect_staying(const std::shared_ptr<const ChangeByResolventSequence> & going_away) const
{
+ Context context("When collecting staying packages:");
+
const std::shared_ptr<const PackageIDSequence> existing((*_imp->env)[selection::AllVersionsUnsorted(
generator::All() | filter::InstalledAtRoot(_imp->env->system_root_key()->value()))]);
@@ -450,9 +452,11 @@ Decider::_make_destination_for(
const ChangeType
Decider::_make_change_type_for(
- const std::shared_ptr<const Resolution> &,
+ const std::shared_ptr<const Resolution> & resolution,
const ChangesToMakeDecision & decision) const
{
+ Context context("When determining change type for '" + stringify(resolution->resolvent()) + "':");
+
if (decision.destination()->replacing()->empty())
{
const std::shared_ptr<const PackageIDSequence> others((*_imp->env)[selection::AllVersionsUnsorted(
@@ -1834,6 +1838,8 @@ Decider::_remove_if_dependent(const std::shared_ptr<const PackageID> & id) const
const std::shared_ptr<const PackageIDSequence>
Decider::_installed_ids(const std::shared_ptr<const Resolution> & resolution) const
{
+ Context context("When finding installed IDs for '" + stringify(resolution->resolvent()) + "':");
+
return (*_imp->env)[selection::AllVersionsSorted(
_make_destination_filtered_generator(generator::Package(resolution->resolvent().package()), resolution) |
make_slot_filter(resolution->resolvent())
@@ -1847,6 +1853,8 @@ Decider::_find_installable_id_candidates_for(
const bool include_errors,
const bool include_unmaskable) const
{
+ Context context("When finding installable ID candidates for '" + stringify(package) + "':");
+
return (*_imp->env)[selection::AllVersionsSorted(
_make_origin_filtered_generator(generator::Package(package)) |
slot_filter |
@@ -2158,6 +2166,8 @@ Decider::resolve()
bool
Decider::_package_dep_spec_already_met(const PackageDepSpec & spec, const std::shared_ptr<const PackageID> & from_id) const
{
+ Context context("When determining already met for '" + stringify(spec) + "':");
+
const std::shared_ptr<const PackageIDSequence> installed_ids((*_imp->env)[selection::AllVersionsUnsorted(
generator::Matches(spec, from_id, { }) |
filter::InstalledAtRoot(_imp->env->system_root_key()->value()))]);
@@ -2177,6 +2187,8 @@ bool
Decider::_block_dep_spec_already_met(const BlockDepSpec & spec, const std::shared_ptr<const PackageID> & from_id,
const Resolvent & resolvent) const
{
+ Context context("When determining already met for '" + stringify(spec) + "':");
+
const std::shared_ptr<const PackageIDSequence> installed_ids((*_imp->env)[selection::SomeArbitraryVersion(
generator::Matches(spec.blocking(), from_id, { }) |
make_slot_filter(resolvent) |
diff --git a/paludis/resolver/get_initial_constraints_for_helper.cc b/paludis/resolver/get_initial_constraints_for_helper.cc
index 4dd3b94..734fa9f 100644
--- a/paludis/resolver/get_initial_constraints_for_helper.cc
+++ b/paludis/resolver/get_initial_constraints_for_helper.cc
@@ -89,6 +89,8 @@ GetInitialConstraintsForHelper::add_without_spec(const PackageDepSpec & spec)
void
GetInitialConstraintsForHelper::add_preset_spec(const PackageDepSpec & spec, const std::shared_ptr<const PackageID> & from_id)
{
+ Context context("When adding preset for '" + stringify(spec) + "':");
+
auto reason(std::make_shared<PresetReason>("preset", make_null_shared_ptr()));
auto ids((*_imp->env)[selection::BestVersionInEachSlot(generator::Matches(spec, from_id, { }))]);
diff --git a/paludis/resolver/get_resolvents_for_helper.cc b/paludis/resolver/get_resolvents_for_helper.cc
index c5ed35e..f3b97e2 100644
--- a/paludis/resolver/get_resolvents_for_helper.cc
+++ b/paludis/resolver/get_resolvents_for_helper.cc
@@ -268,6 +268,8 @@ GetResolventsForHelper::operator() (
const std::shared_ptr<const SlotName> & maybe_slot,
const std::shared_ptr<const Reason> & reason) const
{
+ Context context("When determining resolvents for '" + stringify(spec) + "':");
+
auto result_ids(std::make_shared<PackageIDSequence>());
std::shared_ptr<const PackageID> best;
diff --git a/paludis/resolver/get_use_existing_nothing_helper.cc b/paludis/resolver/get_use_existing_nothing_helper.cc
index 0e09349..ed45432 100644
--- a/paludis/resolver/get_use_existing_nothing_helper.cc
+++ b/paludis/resolver/get_use_existing_nothing_helper.cc
@@ -214,6 +214,8 @@ GetUseExistingNothingHelper::operator() (
const PackageDepSpec & spec,
const std::shared_ptr<const Reason> & reason) const
{
+ Context context("When determining use existing for '" + stringify(spec) + "':");
+
if (spec.package_ptr())
{
if (use_existing_from_withish(_imp->env, *spec.package_ptr(), _imp->without_specs))
diff --git a/paludis/resolver/interest_in_spec_helper.cc b/paludis/resolver/interest_in_spec_helper.cc
index 919ec61..305f019 100644
--- a/paludis/resolver/interest_in_spec_helper.cc
+++ b/paludis/resolver/interest_in_spec_helper.cc
@@ -253,6 +253,8 @@ InterestInSpecHelper::operator() (
const std::shared_ptr<const PackageID> & id,
const SanitisedDependency & dep) const
{
+ Context context("When determining interest in '" + stringify(dep.spec()) + "':");
+
CareAboutDepFnVisitor v{_imp->env, _imp->no_blockers_from_specs, _imp->no_dependencies_from_specs,
_imp->follow_installed_build_dependencies, _imp->follow_installed_dependencies, dep};
diff --git a/paludis/resolver/spec_rewriter.cc b/paludis/resolver/spec_rewriter.cc
index 4ce31e4..4b06747 100644
--- a/paludis/resolver/spec_rewriter.cc
+++ b/paludis/resolver/spec_rewriter.cc
@@ -154,6 +154,8 @@ SpecRewriter::_need_rewrites() const
return;
_imp->has_rewrites = true;
+ Context context("When performing virtuals rewrites:");
+
const std::shared_ptr<const PackageIDSequence> ids((*_imp->env)[selection::AllVersionsSorted(
generator::InRepository(RepositoryName("virtuals")) +
generator::InRepository(RepositoryName("installed-virtuals"))