aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/pipe_command_handler.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-19 01:19:21 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-19 01:19:21 +0000
commit7d994ad210d8fc308a506ad9c2cd3eeed4607a65 (patch)
treea85245d7592cdd3fc289998e4b863268825c0f3e /paludis/repositories/e/pipe_command_handler.cc
parentb990aeda2d842664cb12aa75c5cb48142779af82 (diff)
downloadpaludis-7d994ad210d8fc308a506ad9c2cd3eeed4607a65.tar.gz
paludis-7d994ad210d8fc308a506ad9c2cd3eeed4607a65.tar.xz
Do annotations differently
Diffstat (limited to 'paludis/repositories/e/pipe_command_handler.cc')
-rw-r--r--paludis/repositories/e/pipe_command_handler.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/paludis/repositories/e/pipe_command_handler.cc b/paludis/repositories/e/pipe_command_handler.cc
index 72ba2d79d..1314c1926 100644
--- a/paludis/repositories/e/pipe_command_handler.cc
+++ b/paludis/repositories/e/pipe_command_handler.cc
@@ -47,6 +47,7 @@
#include <paludis/filter.hh>
#include <paludis/filtered_generator.hh>
#include <paludis/choice.hh>
+#include <paludis/dep_spec_annotations.hh>
#include <vector>
#include <limits>
#include <sstream>
@@ -117,10 +118,9 @@ namespace
{
bool seen_description(false), done_brackets(false);
- if (p.annotations_key())
- for (MetadataSectionKey::MetadataConstIterator k(p.annotations_key()->begin_metadata()),
- k_end(p.annotations_key()->end_metadata()) ;
- k != k_end ; ++k)
+ if (p.maybe_annotations())
+ for (auto m(p.maybe_annotations()->begin()), m_end(p.maybe_annotations()->end()) ;
+ m != m_end ; ++m)
{
if (! done_brackets)
{
@@ -128,13 +128,9 @@ namespace
done_brackets = true;
}
- const MetadataValueKey<std::string> * r(
- simple_visitor_cast<const MetadataValueKey<std::string> >(**k));
- if (! r)
- throw InternalError(PALUDIS_HERE, "annotations must be string keys");
- str << (*k)->raw_name() << " = [" << (r->value().empty() ? " " : " " + r->value() + " ") << "] ";
+ str << m->key() << " = [" << (m->value().empty() ? " " : " " + m->value() + " ") << "] ";
- if ((*k)->raw_name() == description_annotation)
+ if (m->key() == description_annotation)
seen_description = true;
}