aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-01-07 00:41:15 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-01-07 00:41:15 +0000
commitbfbc950a043521060ac42b4745f9feafcae75cd9 (patch)
treee63d4332b8f0779dfbef77de15092f136deaa6c5
parentee63c90d9003ce268162363d99a8c6ba34072027 (diff)
downloadpaludis-bfbc950a043521060ac42b4745f9feafcae75cd9.tar.gz
paludis-bfbc950a043521060ac42b4745f9feafcae75cd9.tar.xz
Print each metadata key only once.
-rw-r--r--src/clients/qualudis/qualudis.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/clients/qualudis/qualudis.cc b/src/clients/qualudis/qualudis.cc
index 0795f02..58ae97c 100644
--- a/src/clients/qualudis/qualudis.cc
+++ b/src/clients/qualudis/qualudis.cc
@@ -172,6 +172,8 @@ namespace
FSEntry previous_entry;
std::string previous_name;
+ std::set<const MetadataKey *> printed_keys;
+
QualudisReporter() :
previous_entry("/NONE"),
previous_name("NONE")
@@ -236,6 +238,10 @@ namespace
for (QAMessage::KeysSequence::ConstIterator i(msg.associated_keys->begin()),
i_end(msg.associated_keys->end()) ; i != i_end ; ++i)
{
+ if (printed_keys.end() != printed_keys.find(&**i))
+ continue;
+ printed_keys.insert(&**i);
+
MetadataKeyPrettyPrinter pp;
(*i)->accept(pp);
std::cout << " " << pp.stream.str();