aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-09-13 21:31:58 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-09-13 21:31:58 +0000
commit60a4c65532e044f82e4badf8a51685fbec9d82d8 (patch)
treec4cd9d3ffd5e1bed9093260dd43da12f868567b0
parentc845a694af1295fd99b3c84465e505dbba446bfa (diff)
downloadpaludis-60a4c65532e044f82e4badf8a51685fbec9d82d8.tar.gz
paludis-60a4c65532e044f82e4badf8a51685fbec9d82d8.tar.xz
More context for certain error messages
-rw-r--r--paludis/package_database.cc7
-rw-r--r--src/paludis/query.cc4
2 files changed, 11 insertions, 0 deletions
diff --git a/paludis/package_database.cc b/paludis/package_database.cc
index f0b6554..3f218c5 100644
--- a/paludis/package_database.cc
+++ b/paludis/package_database.cc
@@ -177,6 +177,8 @@ QualifiedPackageName
PackageDatabase::fetch_unique_qualified_package_name(
const PackageNamePart & p) const
{
+ Context context("When disambiguating package name '" + stringify(p) + "':");
+
QualifiedPackageNameCollection::Pointer result(new QualifiedPackageNameCollection::Concrete);
IndirectIterator<std::list<Repository::ConstPointer>::const_iterator, const Repository>
@@ -184,11 +186,16 @@ PackageDatabase::fetch_unique_qualified_package_name(
r_end(_imp->repositories.end());
for ( ; r != r_end ; ++r)
{
+ Context context("When looking in repository '" + stringify(r->name()) + "':");
+
CategoryNamePartCollection::ConstPointer cats(r->category_names());
CategoryNamePartCollection::Iterator c(cats->begin()), c_end(cats->end());
for ( ; c != c_end ; ++c)
+ {
+ Context context("When looking in category '" + stringify(*c) + "':");
if (r->has_package_named(*c + p))
result->insert(*c + p);
+ }
}
if (result->empty())
diff --git a/src/paludis/query.cc b/src/paludis/query.cc
index 9d6025b..d0ce74e 100644
--- a/src/paludis/query.cc
+++ b/src/paludis/query.cc
@@ -78,6 +78,9 @@ void do_one_package_query(
std::string old_slot;
for (e = entries->begin() ; e != e_end ; ++e)
+ {
+ Context context("When displaying entry '" + stringify(*e) + "':'");
+
if (e->repository == *r)
{
VersionMetadata::ConstPointer metadata(env->package_database()->fetch_repository(
@@ -142,6 +145,7 @@ void do_one_package_query(
cout << "*";
cout << " ";
}
+ }
/* still need to show the slot for the last item */
if (CommandLine::get_instance()->a_show_slot.specified())