aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-03-22 14:01:30 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-03-22 14:01:30 +0000
commit7f12b80981c56c2c3f25fa096ecc0fd04d245182 (patch)
treef5bc5523aa94207d88e31cdcc9f3ceb3637ac5aa
parent0d1eded08c45047975d21beee435dd6c48ac598d (diff)
downloadpaludis-7f12b80981c56c2c3f25fa096ecc0fd04d245182.tar.gz
paludis-7f12b80981c56c2c3f25fa096ecc0fd04d245182.tar.xz
Support searching in choices
-rw-r--r--src/clients/cave/cmd_match.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/clients/cave/cmd_match.cc b/src/clients/cave/cmd_match.cc
index c236a61..566920a 100644
--- a/src/clients/cave/cmd_match.cc
+++ b/src/clients/cave/cmd_match.cc
@@ -40,6 +40,7 @@
#include <paludis/package_id.hh>
#include <paludis/mask.hh>
#include <paludis/metadata_key.hh>
+#include <paludis/choice.hh>
#include <cstdlib>
#include <iostream>
#include <algorithm>
@@ -207,8 +208,13 @@ namespace
texts.push_back(stringify(*k.value()));
}
- void visit(const MetadataValueKey<std::tr1::shared_ptr<const Choices> > &)
+ void visit(const MetadataValueKey<std::tr1::shared_ptr<const Choices> > & k)
{
+ for (Choices::ConstIterator c(k.value()->begin()), c_end(k.value()->end()) ;
+ c != c_end ; ++c)
+ for (Choice::ConstIterator i((*c)->begin()), i_end((*c)->end()) ;
+ i != i_end ; ++i)
+ texts.push_back(stringify((*i)->name_with_prefix()));
}
void visit(const MetadataValueKey<std::tr1::shared_ptr<const RepositoryMaskInfo> > &)