aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-27 22:08:29 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-28 15:31:18 +0000
commitbf9e33c1c76c2c2387ada7ae7294efa21a1c2f2f (patch)
treefe00ac0ca9434b268499b6380220140fc5e1a816 /src
parent761f72d25876dac3e239fad163123d35cacda4a0 (diff)
downloadpaludis-bf9e33c1c76c2c2387ada7ae7294efa21a1c2f2f.tar.gz
paludis-bf9e33c1c76c2c2387ada7ae7294efa21a1c2f2f.tar.xz
Allow repos to return partial results if faster
Diffstat (limited to 'src')
-rw-r--r--src/clients/appareo/appareo.cc4
-rw-r--r--src/clients/cave/cmd_find_candidates.cc4
-rw-r--r--src/clients/cave/cmd_import.cc2
-rw-r--r--src/clients/cave/cmd_print_categories.cc6
-rw-r--r--src/clients/cave/cmd_print_packages.cc4
5 files changed, 10 insertions, 10 deletions
diff --git a/src/clients/appareo/appareo.cc b/src/clients/appareo/appareo.cc
index e18bd1b0d..3a19f97ea 100644
--- a/src/clients/appareo/appareo.cc
+++ b/src/clients/appareo/appareo.cc
@@ -259,7 +259,7 @@ main(int argc, char *argv[])
unsigned success(0), total(0);
- std::shared_ptr<const CategoryNamePartSet> cat_names(env.main_repository()->category_names());
+ std::shared_ptr<const CategoryNamePartSet> cat_names(env.main_repository()->category_names({ }));
for (CategoryNamePartSet::ConstIterator c(cat_names->begin()), c_end(cat_names->end()) ;
c != c_end ; ++c)
{
@@ -270,7 +270,7 @@ main(int argc, char *argv[])
stringify(*c)))
continue;
- std::shared_ptr<const QualifiedPackageNameSet> pkg_names(env.main_repository()->package_names(*c));
+ std::shared_ptr<const QualifiedPackageNameSet> pkg_names(env.main_repository()->package_names(*c, { }));
for (QualifiedPackageNameSet::ConstIterator p(pkg_names->begin()), p_end(pkg_names->end()) ;
p != p_end ; ++p)
{
diff --git a/src/clients/cave/cmd_find_candidates.cc b/src/clients/cave/cmd_find_candidates.cc
index 1cd4a1729..e48668a6d 100644
--- a/src/clients/cave/cmd_find_candidates.cc
+++ b/src/clients/cave/cmd_find_candidates.cc
@@ -223,7 +223,7 @@ FindCandidatesCommand::run_hosted(
r != r_end ; ++r)
{
const std::shared_ptr<const Repository> repo(env->package_database()->fetch_repository(*r));
- const std::shared_ptr<const CategoryNamePartSet> cats(repo->category_names());
+ const std::shared_ptr<const CategoryNamePartSet> cats(repo->category_names({ }));
std::copy(cats->begin(), cats->end(), std::inserter(category_names, category_names.end()));
}
@@ -237,7 +237,7 @@ FindCandidatesCommand::run_hosted(
for (CategoryNames::const_iterator c(category_names.begin()), c_end(category_names.end()) ;
c != c_end ; ++c)
{
- const std::shared_ptr<const QualifiedPackageNameSet> qpns(repo->package_names(*c));
+ const std::shared_ptr<const QualifiedPackageNameSet> qpns(repo->package_names(*c, { }));
std::copy(qpns->begin(), qpns->end(), std::inserter(package_names, package_names.end()));
}
}
diff --git a/src/clients/cave/cmd_import.cc b/src/clients/cave/cmd_import.cc
index de1a441a5..a34a23dda 100644
--- a/src/clients/cave/cmd_import.cc
+++ b/src/clients/cave/cmd_import.cc
@@ -292,7 +292,7 @@ ImportCommand::run(
std::shared_ptr<Repository> repo(RepositoryFactory::get_instance()->create(env.get(),
std::bind(from_keys, keys, std::placeholders::_1)));
env->package_database()->add_repository(10, repo);
- std::shared_ptr<const PackageIDSequence> ids(repo->package_ids(package));
+ std::shared_ptr<const PackageIDSequence> ids(repo->package_ids(package, { }));
if (1 != std::distance(ids->begin(), ids->end()))
throw InternalError(PALUDIS_HERE, "ids is '" + join(indirect_iterator(ids->begin()), indirect_iterator(
ids->end()), " ") + "'");
diff --git a/src/clients/cave/cmd_print_categories.cc b/src/clients/cave/cmd_print_categories.cc
index e8d24adbe..e58339973 100644
--- a/src/clients/cave/cmd_print_categories.cc
+++ b/src/clients/cave/cmd_print_categories.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010, 2011 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
@@ -109,13 +109,13 @@ PrintCategoriesCommand::run(
for (args::StringSetArg::ConstIterator p(cmdline.a_containing.begin_args()), p_end(cmdline.a_containing.end_args()) ;
p != p_end ; ++p)
{
- std::shared_ptr<const CategoryNamePartSet> cats((*r)->category_names_containing_package(PackageNamePart(*p)));
+ std::shared_ptr<const CategoryNamePartSet> cats((*r)->category_names_containing_package(PackageNamePart(*p), { }));
std::copy(cats->begin(), cats->end(), std::inserter(categories, categories.begin()));
}
}
else
{
- std::shared_ptr<const CategoryNamePartSet> cats((*r)->category_names());
+ std::shared_ptr<const CategoryNamePartSet> cats((*r)->category_names({ }));
std::copy(cats->begin(), cats->end(), std::inserter(categories, categories.begin()));
}
}
diff --git a/src/clients/cave/cmd_print_packages.cc b/src/clients/cave/cmd_print_packages.cc
index 499abc4c3..0fb64d43b 100644
--- a/src/clients/cave/cmd_print_packages.cc
+++ b/src/clients/cave/cmd_print_packages.cc
@@ -102,7 +102,7 @@ PrintPackagesCommand::run(
cmdline.a_repository.begin_args(), cmdline.a_repository.end_args(), stringify((*r)->name())))
continue;
- std::shared_ptr<const CategoryNamePartSet> categories((*r)->category_names());
+ std::shared_ptr<const CategoryNamePartSet> categories((*r)->category_names({ }));
for (CategoryNamePartSet::ConstIterator c(categories->begin()), c_end(categories->end());
c != c_end; ++c)
{
@@ -111,7 +111,7 @@ PrintPackagesCommand::run(
cmdline.a_category.begin_args(), cmdline.a_category.end_args(), stringify(*c)))
continue;
- std::shared_ptr<const QualifiedPackageNameSet> packages((*r)->package_names(*c));
+ std::shared_ptr<const QualifiedPackageNameSet> packages((*r)->package_names(*c, { }));
std::copy(packages->begin(), packages->end(), std::inserter(all_packages, all_packages.begin()));
}
}