aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/accounts
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/accounts')
-rw-r--r--paludis/repositories/accounts/accounts_dep_key.cc20
-rw-r--r--paludis/repositories/accounts/accounts_dep_key.hh6
2 files changed, 25 insertions, 1 deletions
diff --git a/paludis/repositories/accounts/accounts_dep_key.cc b/paludis/repositories/accounts/accounts_dep_key.cc
index d208bee2b..d7d3aec1d 100644
--- a/paludis/repositories/accounts/accounts_dep_key.cc
+++ b/paludis/repositories/accounts/accounts_dep_key.cc
@@ -32,6 +32,7 @@
#include <paludis/util/pimp-impl.hh>
#include <paludis/partially_made_package_dep_spec.hh>
#include <paludis/always_enabled_dependency_label.hh>
+#include <paludis/pretty_printer.hh>
#include <sstream>
#include <list>
@@ -155,3 +156,22 @@ AccountsDepKey::pretty_print_flat(const DependencySpecTree::ItemFormatter & f) c
return s.str();
}
+const std::string
+AccountsDepKey::pretty_print_value(
+ const PrettyPrinter & pretty_printer,
+ const PrettyPrintOptions &) const
+{
+ std::stringstream s;
+
+ for (std::list<std::shared_ptr<PackageDepSpec> >::const_iterator i(_imp->specs->begin()),
+ i_end(_imp->specs->end()) ; i != i_end ; ++i)
+ {
+ if (! s.str().empty())
+ s << ", ";
+
+ s << pretty_printer.prettify(**i);
+ }
+
+ return s.str();
+}
+
diff --git a/paludis/repositories/accounts/accounts_dep_key.hh b/paludis/repositories/accounts/accounts_dep_key.hh
index b31cdc2c8..d269c00fb 100644
--- a/paludis/repositories/accounts/accounts_dep_key.hh
+++ b/paludis/repositories/accounts/accounts_dep_key.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2009 Ciaran McCreesh
+ * Copyright (c) 2009, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -49,6 +49,10 @@ namespace paludis
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::shared_ptr<const DependenciesLabelSequence> initial_labels() const
PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual const std::string pretty_print_value(
+ const PrettyPrinter &,
+ const PrettyPrintOptions &) const PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
}