aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/vdb_repository.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-10 13:44:44 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-10 16:18:14 +0000
commit42f4775a160a10107f513aa271d1f199c86ce239 (patch)
treef182fc115c20acb39a6d55c0186095b7a475b6be /paludis/repositories/e/vdb_repository.cc
parent69b9f6756b9e7817e14eb9c3c0fe22322f8f462a (diff)
downloadpaludis-42f4775a160a10107f513aa271d1f199c86ce239.tar.gz
paludis-42f4775a160a10107f513aa271d1f199c86ce239.tar.xz
Don't print special annotations
Diffstat (limited to 'paludis/repositories/e/vdb_repository.cc')
-rw-r--r--paludis/repositories/e/vdb_repository.cc28
1 files changed, 25 insertions, 3 deletions
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 01edb0009..020608980 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -1210,13 +1210,35 @@ namespace
void do_annotations(const DepSpec & p)
{
- if (p.maybe_annotations() && (p.maybe_annotations()->begin() != p.maybe_annotations()->end()))
+ if (p.maybe_annotations())
{
- str << " [[ ";
+ bool done_open(false);
for (auto m(p.maybe_annotations()->begin()), m_end(p.maybe_annotations()->end()) ;
m != m_end ; ++m)
+ {
+ switch (m->kind())
+ {
+ case dsak_literal:
+ case dsak_expandable:
+ break;
+
+ case dsak_expanded:
+ case dsak_synthetic:
+ continue;
+
+ case last_dsak:
+ throw InternalError(PALUDIS_HERE, "bad dsak. huh?");
+ }
+
+ if (! done_open)
+ str << " [[ ";
+ done_open = true;
+
str << m->key() << " = [" << (m->value().empty() ? " " : " " + m->value() + " ") << "] ";
- str << "]] ";
+ }
+
+ if (done_open)
+ str << "]] ";
}
}