aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-06-08 10:58:43 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-06-08 10:58:43 +0000
commit8198cf5e997c61ef44ca7444900b6c682050b9ed (patch)
tree1d880739df6b8fcf9226c01beb4059b1caaf5a57
parent9552a62557f54f076d8a29c6ead536cba23e30df (diff)
downloadpaludis-8198cf5e997c61ef44ca7444900b6c682050b9ed.tar.gz
paludis-8198cf5e997c61ef44ca7444900b6c682050b9ed.tar.xz
Fix names cache usage. Fixes: ticket:594
-rw-r--r--paludis/generator.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/paludis/generator.cc b/paludis/generator.cc
index c4ab190..8ec83fc 100644
--- a/paludis/generator.cc
+++ b/paludis/generator.cc
@@ -271,6 +271,20 @@ namespace
return result;
}
+ else if (spec.package_name_part_ptr())
+ {
+ std::tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
+ for (RepositoryNameSet::ConstIterator r(repos->begin()), r_end(repos->end()) ;
+ r != r_end ; ++r)
+ {
+ std::tr1::shared_ptr<const CategoryNamePartSet> cats(
+ env->package_database()->fetch_repository(*r)
+ ->category_names_containing_package(*spec.package_name_part_ptr()));
+ std::copy(cats->begin(), cats->end(), result->inserter());
+ }
+
+ return result;
+ }
else if (spec.package_ptr())
{
std::tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);