aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/cmd_print_sets.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-08-13 22:22:04 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-08-25 20:57:34 +0100
commitd3a6729806b151177a499da5045bc0565432ea6d (patch)
tree3002a66bfc8eedefc97f52602cc817574061ff1b /src/clients/cave/cmd_print_sets.cc
parentefe1d56f129dea213603e2f2b58c14e529f2695f (diff)
downloadpaludis-d3a6729806b151177a499da5045bc0565432ea6d.tar.gz
paludis-d3a6729806b151177a499da5045bc0565432ea6d.tar.xz
Do sets differently
Sets from repositories are now named setname::repo, and we automatically create a master setname containing all of those sets. Cache sets cleanly whilst we're at it. Fixes: ticket:746
Diffstat (limited to 'src/clients/cave/cmd_print_sets.cc')
-rw-r--r--src/clients/cave/cmd_print_sets.cc20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/clients/cave/cmd_print_sets.cc b/src/clients/cave/cmd_print_sets.cc
index b00f360..21339c0 100644
--- a/src/clients/cave/cmd_print_sets.cc
+++ b/src/clients/cave/cmd_print_sets.cc
@@ -81,25 +81,7 @@ PrintSetsCommand::run(
if (cmdline.begin_parameters() != cmdline.end_parameters())
throw args::DoHelp("print-sets takes no parameters");
- std::set<SetName> sets;
-
- for (IndirectIterator<PackageDatabase::RepositoryConstIterator, const Repository>
- r(env->package_database()->begin_repositories()), r_end(env->package_database()->end_repositories());
- r != r_end; ++r)
- {
- if ((*r).sets_interface() == 0)
- continue;
-
- std::tr1::shared_ptr<const SetNameSet> set_names((*r).sets_interface()->sets_list());
-
- std::copy(set_names->begin(), set_names->end(), std::inserter(sets, sets.begin()));
- }
-
- std::tr1::shared_ptr<const SetNameSet> user_sets(env->set_names());
- if (user_sets)
- std::copy(user_sets->begin(), user_sets->end(), std::inserter(sets, sets.begin()));
-
- std::copy(sets.begin(), sets.end(), std::ostream_iterator<SetName>(cout, "\n"));
+ std::copy(env->set_names()->begin(), env->set_names()->end(), std::ostream_iterator<SetName>(cout, "\n"));
return EXIT_SUCCESS;
}