aboutsummaryrefslogtreecommitdiff
path: root/paludis
diff options
context:
space:
mode:
Diffstat (limited to 'paludis')
-rw-r--r--paludis/environments/test/test_environment.cc2
-rw-r--r--paludis/files.m42
-rw-r--r--paludis/generator.cc20
-rw-r--r--paludis/generator_handler.cc8
-rw-r--r--paludis/package_database.cc2
-rw-r--r--paludis/package_database_TEST.cc4
-rw-r--r--paludis/repositories/accounts/accounts_repository.cc16
-rw-r--r--paludis/repositories/accounts/accounts_repository.hh14
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc16
-rw-r--r--paludis/repositories/cran/cran_installed_repository.hh10
-rw-r--r--paludis/repositories/cran/cran_installed_repository_TEST.cc4
-rw-r--r--paludis/repositories/cran/cran_repository.cc16
-rw-r--r--paludis/repositories/cran/cran_repository.hh10
-rw-r--r--paludis/repositories/cran/cran_repository_TEST.cc14
-rw-r--r--paludis/repositories/e/e_installed_repository.cc2
-rw-r--r--paludis/repositories/e/e_installed_repository.hh3
-rw-r--r--paludis/repositories/e/e_repository.cc25
-rw-r--r--paludis/repositories/e/e_repository.hh14
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc80
-rw-r--r--paludis/repositories/e/exndbam_repository.cc22
-rw-r--r--paludis/repositories/e/exndbam_repository.hh18
-rw-r--r--paludis/repositories/e/exndbam_repository_TEST.cc12
-rw-r--r--paludis/repositories/e/vdb_repository.cc28
-rw-r--r--paludis/repositories/e/vdb_repository.hh13
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc26
-rw-r--r--paludis/repositories/fake/fake_installed_repository.cc6
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc18
-rw-r--r--paludis/repositories/fake/fake_repository_base.hh10
-rw-r--r--paludis/repositories/gemcutter/gemcutter_repository.cc16
-rw-r--r--paludis/repositories/gemcutter/gemcutter_repository.hh14
-rw-r--r--paludis/repositories/repository/repository_repository.cc16
-rw-r--r--paludis/repositories/repository/repository_repository.hh14
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.cc16
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.hh14
-rw-r--r--paludis/repositories/unpackaged/installed_id.cc2
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc14
-rw-r--r--paludis/repositories/unpackaged/installed_repository.hh12
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.cc12
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.hh12
-rw-r--r--paludis/repositories/unwritten/unwritten_repository.cc16
-rw-r--r--paludis/repositories/unwritten/unwritten_repository.hh14
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc12
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.hh13
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc12
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.hh14
-rw-r--r--paludis/repositories/virtuals/virtuals_repository_TEST.cc14
-rw-r--r--paludis/repository-fwd.hh6
-rw-r--r--paludis/repository.cc10
-rw-r--r--paludis/repository.hh23
-rw-r--r--paludis/repository.se21
-rw-r--r--paludis/repository_name_cache.cc4
51 files changed, 386 insertions, 330 deletions
diff --git a/paludis/environments/test/test_environment.cc b/paludis/environments/test/test_environment.cc
index eb84fc6f0..d8fbc8abc 100644
--- a/paludis/environments/test/test_environment.cc
+++ b/paludis/environments/test/test_environment.cc
@@ -128,7 +128,7 @@ TestEnvironment::fetch_package_id(const QualifiedPackageName & q,
{
using namespace std::placeholders;
- std::shared_ptr<const PackageIDSequence> ids(package_database()->fetch_repository(r)->package_ids(q));
+ std::shared_ptr<const PackageIDSequence> ids(package_database()->fetch_repository(r)->package_ids(q, { }));
for (PackageIDSequence::ConstIterator i(ids->begin()), i_end(ids->end()) ;
i != i_end ; ++i)
if (v == (*i)->version())
diff --git a/paludis/files.m4 b/paludis/files.m4
index 0fae3f739..005496e1d 100644
--- a/paludis/files.m4
+++ b/paludis/files.m4
@@ -84,7 +84,7 @@ add(`partially_made_package_dep_spec', `hh', `cc', `fwd', `se')
add(`permitted_choice_value_parameter_values', `hh', `cc', `fwd')
add(`pretty_print_options', `hh', `cc', `fwd', `se')
add(`pretty_printer', `hh', `cc', `fwd')
-add(`repository', `hh', `fwd', `cc')
+add(`repository', `hh', `fwd', `cc', `se')
add(`repository_factory', `hh', `fwd', `cc')
add(`repository_name_cache', `hh', `cc', `test', `testscript')
add(`selection', `hh', `cc', `fwd', `test')
diff --git a/paludis/generator.cc b/paludis/generator.cc
index 056d25fd3..5378ae870 100644
--- a/paludis/generator.cc
+++ b/paludis/generator.cc
@@ -172,7 +172,7 @@ namespace
q != q_end ; ++q)
{
std::shared_ptr<const PackageIDSequence> id(
- env->package_database()->fetch_repository(*r)->package_ids(*q));
+ env->package_database()->fetch_repository(*r)->package_ids(*q, { }));
for (PackageIDSequence::ConstIterator i(id->begin()), i_end(id->end()) ;
i != i_end ; ++i)
if ((*i)->from_repositories_key() && ((*i)->from_repositories_key()->value()->end() !=
@@ -209,7 +209,7 @@ namespace
for (RepositoryNameSet::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
- if (env->package_database()->fetch_repository(*r)->has_category_named(name))
+ if (env->package_database()->fetch_repository(*r)->has_category_named(name, { }))
{
result->insert(name);
break;
@@ -243,7 +243,7 @@ namespace
for (RepositoryNameSet::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
- if (env->package_database()->fetch_repository(*r)->has_category_named(name.category()))
+ if (env->package_database()->fetch_repository(*r)->has_category_named(name.category(), { }))
{
result->insert(name.category());
break;
@@ -262,7 +262,7 @@ namespace
r != r_end ; ++r)
for (CategoryNamePartSet::ConstIterator c(cats->begin()), c_end(cats->end()) ;
c != c_end ; ++c)
- if (env->package_database()->fetch_repository(*r)->has_package_named(name))
+ if (env->package_database()->fetch_repository(*r)->has_package_named(name, { }))
result->insert(name);
return result;
@@ -358,7 +358,7 @@ namespace
std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
for (RepositoryNameSet::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
- if (env->package_database()->fetch_repository(*r)->has_category_named(*spec.category_name_part_ptr()))
+ if (env->package_database()->fetch_repository(*r)->has_category_named(*spec.category_name_part_ptr(), { }))
{
result->insert(*spec.category_name_part_ptr());
break;
@@ -374,7 +374,7 @@ namespace
{
std::shared_ptr<const CategoryNamePartSet> cats(
env->package_database()->fetch_repository(*r)
- ->category_names_containing_package(*spec.package_name_part_ptr()));
+ ->category_names_containing_package(*spec.package_name_part_ptr(), { }));
std::copy(cats->begin(), cats->end(), result->inserter());
}
@@ -385,7 +385,7 @@ namespace
std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
for (RepositoryNameSet::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
- if (env->package_database()->fetch_repository(*r)->has_category_named(spec.package_ptr()->category()))
+ if (env->package_database()->fetch_repository(*r)->has_category_named(spec.package_ptr()->category(), { }))
{
result->insert(spec.package_ptr()->category());
break;
@@ -409,7 +409,7 @@ namespace
r != r_end ; ++r)
for (CategoryNamePartSet::ConstIterator c(cats->begin()), c_end(cats->end()) ;
c != c_end ; ++c)
- if (env->package_database()->fetch_repository(*r)->has_package_named(*c + *spec.package_name_part_ptr()))
+ if (env->package_database()->fetch_repository(*r)->has_package_named(*c + *spec.package_name_part_ptr(), { }))
result->insert(*c + *spec.package_name_part_ptr());
return result;
@@ -419,7 +419,7 @@ namespace
std::shared_ptr<QualifiedPackageNameSet> result(std::make_shared<QualifiedPackageNameSet>());
for (RepositoryNameSet::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
- if (env->package_database()->fetch_repository(*r)->has_package_named(*spec.package_ptr()))
+ if (env->package_database()->fetch_repository(*r)->has_package_named(*spec.package_ptr(), { }))
{
result->insert(*spec.package_ptr());
break;
@@ -445,7 +445,7 @@ namespace
q != q_end ; ++q)
{
std::shared_ptr<const PackageIDSequence> id(
- env->package_database()->fetch_repository(*r)->package_ids(*q));
+ env->package_database()->fetch_repository(*r)->package_ids(*q, { }));
for (PackageIDSequence::ConstIterator i(id->begin()), i_end(id->end()) ;
i != i_end ; ++i)
if (match_package(*env, spec, *i, from_id, options))
diff --git a/paludis/generator_handler.cc b/paludis/generator_handler.cc
index aeb5fd9bb..73320edad 100644
--- a/paludis/generator_handler.cc
+++ b/paludis/generator_handler.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2010 Ciaran McCreesh
+ * Copyright (c) 2008, 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
@@ -55,7 +55,7 @@ AllGeneratorHandlerBase::categories(
for (RepositoryNameSet::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
{
- std::shared_ptr<const CategoryNamePartSet> cats(env->package_database()->fetch_repository(*r)->category_names());
+ std::shared_ptr<const CategoryNamePartSet> cats(env->package_database()->fetch_repository(*r)->category_names({ }));
std::copy(cats->begin(), cats->end(), result->inserter());
}
@@ -77,7 +77,7 @@ AllGeneratorHandlerBase::packages(
c != c_end ; ++c)
{
std::shared_ptr<const QualifiedPackageNameSet> pkgs(
- env->package_database()->fetch_repository(*r)->package_names(*c));
+ env->package_database()->fetch_repository(*r)->package_names(*c, { }));
std::copy(pkgs->begin(), pkgs->end(), result->inserter());
}
}
@@ -100,7 +100,7 @@ AllGeneratorHandlerBase::ids(
q != q_end ; ++q)
{
std::shared_ptr<const PackageIDSequence> i(
- env->package_database()->fetch_repository(*r)->package_ids(*q));
+ env->package_database()->fetch_repository(*r)->package_ids(*q, { }));
std::copy(i->begin(), i->end(), result->inserter());
}
}
diff --git a/paludis/package_database.cc b/paludis/package_database.cc
index 582863098..12f3c4b8b 100644
--- a/paludis/package_database.cc
+++ b/paludis/package_database.cc
@@ -292,7 +292,7 @@ PackageDatabase::fetch_unique_qualified_package_name(const PackageNamePart & p,
continue;
auto repo(fetch_repository(it->repository_name()));
- std::shared_ptr<const CategoryNamePartSet> unimportant_cats(repo->unimportant_category_names());
+ std::shared_ptr<const CategoryNamePartSet> unimportant_cats(repo->unimportant_category_names({ }));
bool is_important(unimportant_cats->end() == unimportant_cats->find(it->name().category()));
bool is_in_important_repo(! repo->is_unimportant());
QPNIMap::iterator i(result->insert(std::make_pair(it->name(), std::make_pair(is_important, is_in_important_repo))).first);
diff --git a/paludis/package_database_TEST.cc b/paludis/package_database_TEST.cc
index d2196cfa2..431be9b28 100644
--- a/paludis/package_database_TEST.cc
+++ b/paludis/package_database_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 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
@@ -112,7 +112,7 @@ namespace test_cases
{
}
- std::shared_ptr<const CategoryNamePartSet> unimportant_category_names() const
+ std::shared_ptr<const CategoryNamePartSet> unimportant_category_names(const RepositoryContentMayExcludes &) const
{
std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
result->insert(CategoryNamePart("bad-cat1"));
diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc
index a84d72a46..4a1fd33ae 100644
--- a/paludis/repositories/accounts/accounts_repository.cc
+++ b/paludis/repositories/accounts/accounts_repository.cc
@@ -296,43 +296,43 @@ AccountsRepository::is_unimportant() const
}
bool
-AccountsRepository::has_category_named(const CategoryNamePart & c) const
+AccountsRepository::has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return _imp->store->has_category_named(c);
}
bool
-AccountsRepository::has_package_named(const QualifiedPackageName & q) const
+AccountsRepository::has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const
{
return _imp->store->has_package_named(q);
}
std::shared_ptr<const CategoryNamePartSet>
-AccountsRepository::category_names() const
+AccountsRepository::category_names(const RepositoryContentMayExcludes &) const
{
return _imp->store->category_names();
}
std::shared_ptr<const CategoryNamePartSet>
-AccountsRepository::unimportant_category_names() const
+AccountsRepository::unimportant_category_names(const RepositoryContentMayExcludes &) const
{
return _imp->store->unimportant_category_names();
}
std::shared_ptr<const CategoryNamePartSet>
-AccountsRepository::category_names_containing_package(const PackageNamePart & p) const
+AccountsRepository::category_names_containing_package(const PackageNamePart & p, const RepositoryContentMayExcludes & x) const
{
- return Repository::category_names_containing_package(p);
+ return Repository::category_names_containing_package(p, x);
}
std::shared_ptr<const QualifiedPackageNameSet>
-AccountsRepository::package_names(const CategoryNamePart & c) const
+AccountsRepository::package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return _imp->store->package_names(c);
}
std::shared_ptr<const PackageIDSequence>
-AccountsRepository::package_ids(const QualifiedPackageName & p) const
+AccountsRepository::package_ids(const QualifiedPackageName & p, const RepositoryContentMayExcludes &) const
{
return _imp->store->package_ids(p);
}
diff --git a/paludis/repositories/accounts/accounts_repository.hh b/paludis/repositories/accounts/accounts_repository.hh
index 78d030791..3b8aff3f0 100644
--- a/paludis/repositories/accounts/accounts_repository.hh
+++ b/paludis/repositories/accounts/accounts_repository.hh
@@ -120,15 +120,15 @@ namespace paludis
///\{
virtual const bool is_unimportant() const;
- virtual bool has_category_named(const CategoryNamePart & c) const;
- virtual bool has_package_named(const QualifiedPackageName & q) const;
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const;
- virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names() const;
+ virtual bool has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const;
+ virtual bool has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names(const RepositoryContentMayExcludes &) const;
virtual std::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
- const PackageNamePart & p) const;
+ const PackageNamePart & p, const RepositoryContentMayExcludes &) const;
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart & c) const;
- virtual std::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p) const;
+ const CategoryNamePart & c, const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p, const RepositoryContentMayExcludes &) const;
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
virtual bool some_ids_might_not_be_masked() const;
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index 02d46a2c8..e764df7cb 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -187,7 +187,7 @@ CRANInstalledRepository::_add_metadata_keys() const
}
bool
-CRANInstalledRepository::has_category_named(const CategoryNamePart & c) const
+CRANInstalledRepository::has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return (CategoryNamePart("cran") == c);
}
@@ -199,11 +199,11 @@ CRANInstalledRepository::is_unimportant() const
}
bool
-CRANInstalledRepository::has_package_named(const QualifiedPackageName & q) const
+CRANInstalledRepository::has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes & x) const
{
Context context("When checking for package '" + stringify(q) + "' in " + stringify(name()) + ":");
- if (! has_category_named(q.category()))
+ if (! has_category_named(q.category(), x))
return false;
need_ids();
@@ -212,7 +212,7 @@ CRANInstalledRepository::has_package_named(const QualifiedPackageName & q) const
}
std::shared_ptr<const CategoryNamePartSet>
-CRANInstalledRepository::category_names() const
+CRANInstalledRepository::category_names(const RepositoryContentMayExcludes &) const
{
std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
result->insert(CategoryNamePart("cran"));
@@ -220,13 +220,13 @@ CRANInstalledRepository::category_names() const
}
std::shared_ptr<const QualifiedPackageNameSet>
-CRANInstalledRepository::package_names(const CategoryNamePart & c) const
+CRANInstalledRepository::package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes & x) const
{
Context context("When fetching package names in category '" + stringify(c)
+ "' in " + stringify(name()) + ":");
std::shared_ptr<QualifiedPackageNameSet> result(std::make_shared<QualifiedPackageNameSet>());
- if (! has_category_named(c))
+ if (! has_category_named(c, x))
return result;
need_ids();
@@ -238,13 +238,13 @@ CRANInstalledRepository::package_names(const CategoryNamePart & c) const
}
std::shared_ptr<const PackageIDSequence>
-CRANInstalledRepository::package_ids(const QualifiedPackageName & n) const
+CRANInstalledRepository::package_ids(const QualifiedPackageName & n, const RepositoryContentMayExcludes & x) const
{
Context context("When fetching versions of '" + stringify(n) + "' in "
+ stringify(name()) + ":");
std::shared_ptr<PackageIDSequence> result(std::make_shared<PackageIDSequence>());
- if (! has_package_named(n))
+ if (! has_package_named(n, x))
return result;
need_ids();
diff --git a/paludis/repositories/cran/cran_installed_repository.hh b/paludis/repositories/cran/cran_installed_repository.hh
index 2e3f71baa..f5c3b7535 100644
--- a/paludis/repositories/cran/cran_installed_repository.hh
+++ b/paludis/repositories/cran/cran_installed_repository.hh
@@ -125,20 +125,20 @@ namespace paludis
/* Repository */
virtual std::shared_ptr<const PackageIDSequence> package_ids(
- const QualifiedPackageName &) const
+ const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart &) const
+ const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_package_named(const QualifiedPackageName &) const
+ virtual bool has_package_named(const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_category_named(const CategoryNamePart &) const
+ virtual bool has_category_named(const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const bool is_unimportant() const;
diff --git a/paludis/repositories/cran/cran_installed_repository_TEST.cc b/paludis/repositories/cran/cran_installed_repository_TEST.cc
index 0f7a4b766..d7e4dd8d9 100644
--- a/paludis/repositories/cran/cran_installed_repository_TEST.cc
+++ b/paludis/repositories/cran/cran_installed_repository_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 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
@@ -61,7 +61,7 @@ namespace test_cases
keys->insert("builddir", "cran_installed_repository_TEST_dir/tmp");
std::shared_ptr<Repository> repo(CRANInstalledRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- TEST_CHECK(repo->has_category_named(CategoryNamePart("cran")));
+ TEST_CHECK(repo->has_category_named(CategoryNamePart("cran"), { }));
}
} test_cran_repository_installed_packages;
}
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index 3231f1637..7920c2dd2 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -145,18 +145,18 @@ CRANRepository::_add_metadata_keys() const
}
bool
-CRANRepository::has_category_named(const CategoryNamePart & c) const
+CRANRepository::has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return "cran" == stringify(c);
}
bool
-CRANRepository::has_package_named(const QualifiedPackageName & q) const
+CRANRepository::has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes & x) const
{
Context context("When checking for package '" + stringify(q) + "' in " + stringify(name()) + ":");
Lock l(*_imp->big_nasty_mutex);
- if (! has_category_named(q.category()))
+ if (! has_category_named(q.category(), x))
return false;
need_ids();
@@ -164,7 +164,7 @@ CRANRepository::has_package_named(const QualifiedPackageName & q) const
}
std::shared_ptr<const CategoryNamePartSet>
-CRANRepository::category_names() const
+CRANRepository::category_names(const RepositoryContentMayExcludes &) const
{
Context context("When fetching category names in " + stringify(name()) + ":");
Lock l(*_imp->big_nasty_mutex);
@@ -176,14 +176,14 @@ CRANRepository::category_names() const
}
std::shared_ptr<const QualifiedPackageNameSet>
-CRANRepository::package_names(const CategoryNamePart & c) const
+CRANRepository::package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes & x) const
{
Context context("When fetching package names in category '" + stringify(c)
+ "' in " + stringify(name()) + ":");
Lock l(*_imp->big_nasty_mutex);
std::shared_ptr<QualifiedPackageNameSet> result(std::make_shared<QualifiedPackageNameSet>());
- if (! has_category_named(c))
+ if (! has_category_named(c, x))
return result;
need_ids();
@@ -195,14 +195,14 @@ CRANRepository::package_names(const CategoryNamePart & c) const
}
std::shared_ptr<const PackageIDSequence>
-CRANRepository::package_ids(const QualifiedPackageName & n) const
+CRANRepository::package_ids(const QualifiedPackageName & n, const RepositoryContentMayExcludes & x) const
{
Context context("When fetching versions of '" + stringify(n) + "' in "
+ stringify(name()) + ":");
Lock l(*_imp->big_nasty_mutex);
std::shared_ptr<PackageIDSequence> result(std::make_shared<PackageIDSequence>());
- if (! has_package_named(n))
+ if (! has_package_named(n, x))
return result;
need_ids();
diff --git a/paludis/repositories/cran/cran_repository.hh b/paludis/repositories/cran/cran_repository.hh
index f4b304191..68217e95c 100644
--- a/paludis/repositories/cran/cran_repository.hh
+++ b/paludis/repositories/cran/cran_repository.hh
@@ -130,20 +130,20 @@ namespace paludis
/* Repository */
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart &) const
+ const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_package_named(const QualifiedPackageName &) const
+ virtual bool has_package_named(const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_category_named(const CategoryNamePart &) const
+ virtual bool has_category_named(const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const PackageIDSequence> package_ids(
- const QualifiedPackageName &) const
+ const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const bool is_unimportant() const;
diff --git a/paludis/repositories/cran/cran_repository_TEST.cc b/paludis/repositories/cran/cran_repository_TEST.cc
index 6f11f2cfb..144b9fba7 100644
--- a/paludis/repositories/cran/cran_repository_TEST.cc
+++ b/paludis/repositories/cran/cran_repository_TEST.cc
@@ -2,7 +2,7 @@
/*
* Copyright (c) 2006 Danny van Dyk
- * Copyright (c) 2007, 2008, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 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
@@ -62,9 +62,9 @@ namespace test_cases
keys->insert("builddir", "cran_repository_TEST_dir/tmp");
std::shared_ptr<Repository> repo(CRANRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- TEST_CHECK(repo->has_category_named(CategoryNamePart("cran")));
- TEST_CHECK(repo->has_package_named(QualifiedPackageName("cran/testpackage1")));
- TEST_CHECK(repo->has_package_named(QualifiedPackageName("cran/testpackage2")));
+ TEST_CHECK(repo->has_category_named(CategoryNamePart("cran"), { }));
+ TEST_CHECK(repo->has_package_named(QualifiedPackageName("cran/testpackage1"), { }));
+ TEST_CHECK(repo->has_package_named(QualifiedPackageName("cran/testpackage2"), { }));
}
} test_cran_repository_packages;
@@ -82,9 +82,9 @@ namespace test_cases
keys->insert("builddir", "cran_repository_TEST_dir/tmp");
std::shared_ptr<Repository> repo(CRANRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- TEST_CHECK(repo->has_package_named(QualifiedPackageName("cran/testbundle")));
- TEST_CHECK(repo->has_package_named(QualifiedPackageName("cran/bundlepkg1")));
- TEST_CHECK(repo->has_package_named(QualifiedPackageName("cran/bundlepkg2")));
+ TEST_CHECK(repo->has_package_named(QualifiedPackageName("cran/testbundle"), { }));
+ TEST_CHECK(repo->has_package_named(QualifiedPackageName("cran/bundlepkg1"), { }));
+ TEST_CHECK(repo->has_package_named(QualifiedPackageName("cran/bundlepkg2"), { }));
}
} test_cran_repository_bundle;
}
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index 05211ef41..06aebc666 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -175,7 +175,7 @@ EInstalledRepository::is_unimportant() const
}
std::shared_ptr<const CategoryNamePartSet>
-EInstalledRepository::unimportant_category_names() const
+EInstalledRepository::unimportant_category_names(const RepositoryContentMayExcludes &) const
{
std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
result->insert(CategoryNamePart("virtual"));
diff --git a/paludis/repositories/e/e_installed_repository.hh b/paludis/repositories/e/e_installed_repository.hh
index 36df43dcf..3d076d7db 100644
--- a/paludis/repositories/e/e_installed_repository.hh
+++ b/paludis/repositories/e/e_installed_repository.hh
@@ -74,7 +74,8 @@ namespace paludis
/* Repository */
- virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names() const;
+ virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names(
+ const RepositoryContentMayExcludes &) const;
virtual const bool is_unimportant() const;
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index eda10b252..fc839dbd3 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -586,31 +586,31 @@ ERepository::_add_metadata_keys() const
}
bool
-ERepository::has_category_named(const CategoryNamePart & c) const
+ERepository::has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return _imp->layout->has_category_named(c);
}
bool
-ERepository::has_package_named(const QualifiedPackageName & q) const
+ERepository::has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const
{
return _imp->layout->has_package_named(q);
}
std::shared_ptr<const CategoryNamePartSet>
-ERepository::category_names() const
+ERepository::category_names(const RepositoryContentMayExcludes &) const
{
return _imp->layout->category_names();
}
std::shared_ptr<const QualifiedPackageNameSet>
-ERepository::package_names(const CategoryNamePart & c) const
+ERepository::package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return _imp->layout->package_names(c);
}
std::shared_ptr<const PackageIDSequence>
-ERepository::package_ids(const QualifiedPackageName & n) const
+ERepository::package_ids(const QualifiedPackageName & n, const RepositoryContentMayExcludes &) const
{
return _imp->layout->package_ids(n);
}
@@ -962,15 +962,16 @@ ERepository::regenerate_cache() const
}
std::shared_ptr<const CategoryNamePartSet>
-ERepository::category_names_containing_package(const PackageNamePart & p) const
+ERepository::category_names_containing_package(const PackageNamePart & p,
+ const RepositoryContentMayExcludes & x) const
{
if (! _imp->names_cache->usable())
- return Repository::category_names_containing_package(p);
+ return Repository::category_names_containing_package(p, { });
std::shared_ptr<const CategoryNamePartSet> result(
_imp->names_cache->category_names_containing_package(p));
- return result ? result : Repository::category_names_containing_package(p);
+ return result ? result : Repository::category_names_containing_package(p, x);
}
const ERepositoryParams &
@@ -1017,7 +1018,7 @@ ERepository::perform_hook(const Hook & hook, const std::shared_ptr<OutputManager
}
std::shared_ptr<const CategoryNamePartSet>
-ERepository::unimportant_category_names() const
+ERepository::unimportant_category_names(const RepositoryContentMayExcludes &) const
{
std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
result->insert(CategoryNamePart("virtual"));
@@ -1126,7 +1127,7 @@ ERepository::make_manifest(const QualifiedPackageName & qpn)
}
std::shared_ptr<const PackageIDSequence> versions;
- versions = package_ids(qpn);
+ versions = package_ids(qpn, { });
std::set<std::string> done_files;
@@ -1865,7 +1866,7 @@ ERepository::merge(const MergeParams & m)
if (! is_suitable_destination_for(m.package_id()))
throw ActionFailedError("Not a suitable destination for '" + stringify(*m.package_id()) + "'");
- auto is_replace(find_id(package_ids(m.package_id()->name()), m.package_id()->version()));
+ auto is_replace(find_id(package_ids(m.package_id()->name(), { }), m.package_id()->version()));
bool fix_mtimes(std::static_pointer_cast<const ERepositoryID>(
m.package_id())->eapi()->supported()->ebuild_options()->fix_mtimes());
@@ -1995,7 +1996,7 @@ ERepository::merge(const MergeParams & m)
}
}
- if (! has_category_named(m.package_id()->name().category()))
+ if (! has_category_named(m.package_id()->name().category(), { }))
{
SafeOFStream s(_imp->layout->categories_file(), O_CREAT | O_WRONLY | O_CLOEXEC | O_APPEND, true);
s << m.package_id()->name().category() << std::endl;
diff --git a/paludis/repositories/e/e_repository.hh b/paludis/repositories/e/e_repository.hh
index 73d1dbf6c..b7b2e497f 100644
--- a/paludis/repositories/e/e_repository.hh
+++ b/paludis/repositories/e/e_repository.hh
@@ -121,23 +121,23 @@ namespace paludis
/* Repository */
virtual std::shared_ptr<const PackageIDSequence> package_ids(
- const QualifiedPackageName &) const
+ const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart &) const
+ const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
- const PackageNamePart &) const;
+ const PackageNamePart &, const RepositoryContentMayExcludes &) const;
- virtual bool has_package_named(const QualifiedPackageName &) const
+ virtual bool has_package_named(const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_category_named(const CategoryNamePart &) const
+ virtual bool has_category_named(const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
@@ -152,7 +152,7 @@ namespace paludis
HookResult perform_hook(const Hook &, const std::shared_ptr<OutputManager> &)
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names() const;
+ virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names(const RepositoryContentMayExcludes &) const;
virtual const bool is_unimportant() const;
/**
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 6c0de7cb6..97ec8b241 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -173,10 +173,10 @@ namespace test_cases
{
TestMessageSuffix pass_suffix(stringify(pass), true);
- TEST_CHECK(repo->has_category_named(CategoryNamePart("cat-one")));
- TEST_CHECK(repo->has_category_named(CategoryNamePart("cat-two")));
- TEST_CHECK(repo->has_category_named(CategoryNamePart("cat-three")));
- TEST_CHECK(! repo->has_category_named(CategoryNamePart("cat-four")));
+ TEST_CHECK(repo->has_category_named(CategoryNamePart("cat-one"), { }));
+ TEST_CHECK(repo->has_category_named(CategoryNamePart("cat-two"), { }));
+ TEST_CHECK(repo->has_category_named(CategoryNamePart("cat-three"), { }));
+ TEST_CHECK(! repo->has_category_named(CategoryNamePart("cat-four"), { }));
}
}
} test_e_repository_has_category_named;
@@ -202,7 +202,7 @@ namespace test_cases
{
TestMessageSuffix pass_suffix(stringify(pass), true);
- std::shared_ptr<const CategoryNamePartSet> c(repo->category_names());
+ std::shared_ptr<const CategoryNamePartSet> c(repo->category_names({ }));
TEST_CHECK(c->end() != c->find(CategoryNamePart("cat-one")));
TEST_CHECK(c->end() != c->find(CategoryNamePart("cat-two")));
TEST_CHECK(c->end() != c->find(CategoryNamePart("cat-three")));
@@ -233,18 +233,18 @@ namespace test_cases
{
TestMessageSuffix pass_suffix(stringify(pass), true);
- TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-one/pkg-one")));
- TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-two/pkg-two")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-one/pkg-two")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-two/pkg-one")));
- TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-one/pkg-both")));
- TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-two/pkg-both")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-one/pkg-neither")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-two/pkg-neither")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-one")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-two")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-both")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-neither")));
+ TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-one/pkg-one"), { }));
+ TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-two/pkg-two"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-one/pkg-two"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-two/pkg-one"), { }));
+ TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-one/pkg-both"), { }));
+ TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-two/pkg-both"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-one/pkg-neither"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-two/pkg-neither"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-one"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-two"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-both"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-neither"), { }));
}
}
} test_e_repository_has_package_named;
@@ -266,26 +266,26 @@ namespace test_cases
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- repo->package_names(CategoryNamePart("cat-one"));
- repo->package_names(CategoryNamePart("cat-two"));
- repo->package_names(CategoryNamePart("cat-three"));
+ repo->package_names(CategoryNamePart("cat-one"), { });
+ repo->package_names(CategoryNamePart("cat-two"), { });
+ repo->package_names(CategoryNamePart("cat-three"), { });
for (int pass = 1 ; pass <= 2 ; ++pass)
{
TestMessageSuffix pass_suffix(stringify(pass), true);
- TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-one/pkg-one")));
- TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-two/pkg-two")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-one/pkg-two")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-two/pkg-one")));
- TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-one/pkg-both")));
- TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-two/pkg-both")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-one/pkg-neither")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-two/pkg-neither")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-one")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-two")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-both")));
- TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-neither")));
+ TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-one/pkg-one"), { }));
+ TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-two/pkg-two"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-one/pkg-two"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-two/pkg-one"), { }));
+ TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-one/pkg-both"), { }));
+ TEST_CHECK(repo->has_package_named(QualifiedPackageName("cat-two/pkg-both"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-one/pkg-neither"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-two/pkg-neither"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-one"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-two"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-both"), { }));
+ TEST_CHECK(! repo->has_package_named(QualifiedPackageName("cat-three/pkg-neither"), { }));
}
}
} test_e_repository_has_package_named_cached;
@@ -313,7 +313,7 @@ namespace test_cases
{
TestMessageSuffix pass_suffix(stringify(pass), true);
- names = repo->package_names(CategoryNamePart("cat-one"));
+ names = repo->package_names(CategoryNamePart("cat-one"), { });
TEST_CHECK(! names->empty());
TEST_CHECK(names->end() != names->find(QualifiedPackageName("cat-one/pkg-one")));
TEST_CHECK(names->end() != names->find(QualifiedPackageName("cat-one/pkg-both")));
@@ -321,7 +321,7 @@ namespace test_cases
TEST_CHECK(names->end() == names->find(QualifiedPackageName("cat-one/pkg-neither")));
TEST_CHECK_EQUAL(2, std::distance(names->begin(), names->end()));
- names = repo->package_names(CategoryNamePart("cat-two"));
+ names = repo->package_names(CategoryNamePart("cat-two"), { });
TEST_CHECK(! names->empty());
TEST_CHECK(names->end() == names->find(QualifiedPackageName("cat-two/pkg-one")));
TEST_CHECK(names->end() != names->find(QualifiedPackageName("cat-two/pkg-both")));
@@ -329,7 +329,7 @@ namespace test_cases
TEST_CHECK(names->end() == names->find(QualifiedPackageName("cat-two/pkg-neither")));
TEST_CHECK_EQUAL(2, std::distance(names->begin(), names->end()));
- names = repo->package_names(CategoryNamePart("cat-three"));
+ names = repo->package_names(CategoryNamePart("cat-three"), { });
TEST_CHECK(names->empty());
TEST_CHECK(names->end() == names->find(QualifiedPackageName("cat-three/pkg-one")));
TEST_CHECK(names->end() == names->find(QualifiedPackageName("cat-three/pkg-both")));
@@ -363,7 +363,7 @@ namespace test_cases
{
TestMessageSuffix pass_suffix(stringify(pass), true);
- names = repo->package_names(CategoryNamePart("cat-one"));
+ names = repo->package_names(CategoryNamePart("cat-one"), { });
TEST_CHECK(! names->empty());
TEST_CHECK(names->end() != names->find(QualifiedPackageName("cat-one/pkg-one")));
TEST_CHECK_EQUAL(1, std::distance(names->begin(), names->end()));
@@ -397,7 +397,7 @@ namespace test_cases
std::shared_ptr<const PackageIDSequence> versions;
- versions = repo->package_ids(QualifiedPackageName("cat-one/pkg-one"));
+ versions = repo->package_ids(QualifiedPackageName("cat-one/pkg-one"), { });
TEST_CHECK(! versions->empty());
TEST_CHECK_EQUAL(2, std::distance(versions->begin(), versions->end()));
TEST_CHECK(indirect_iterator(versions->end()) != std::find_if(
@@ -410,7 +410,7 @@ namespace test_cases
indirect_iterator(versions->begin()), indirect_iterator(versions->end()),
std::bind(std::equal_to<VersionSpec>(), std::bind(std::mem_fn(&PackageID::version), _1), VersionSpec("2", VersionSpecOptions()))));
- versions = repo->package_ids(QualifiedPackageName("cat-one/pkg-neither"));
+ versions = repo->package_ids(QualifiedPackageName("cat-one/pkg-neither"), { });
TEST_CHECK(versions->empty());
TEST_CHECK_EQUAL(0, std::distance(versions->begin(), versions->end()));
}
@@ -443,7 +443,7 @@ namespace test_cases
std::shared_ptr<const PackageIDSequence> versions;
- versions = repo->package_ids(QualifiedPackageName("cat-one/pkg-one"));
+ versions = repo->package_ids(QualifiedPackageName("cat-one/pkg-one"), { });
TEST_CHECK(! versions->empty());
TEST_CHECK_EQUAL(2, std::distance(versions->begin(), versions->end()));
TEST_CHECK(indirect_iterator(versions->end()) != std::find_if(
@@ -456,7 +456,7 @@ namespace test_cases
indirect_iterator(versions->begin()), indirect_iterator(versions->end()),
std::bind(std::equal_to<VersionSpec>(), std::bind(std::mem_fn(&PackageID::version), _1), VersionSpec("2", VersionSpecOptions()))));
- versions = repo->package_ids(QualifiedPackageName("cat-one/pkg-neither"));
+ versions = repo->package_ids(QualifiedPackageName("cat-one/pkg-neither"), { });
TEST_CHECK(versions->empty());
TEST_CHECK_EQUAL(0, std::distance(versions->begin(), versions->end()));
}
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 152e754c0..86b4c6a24 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -205,7 +205,8 @@ ExndbamRepository::invalidate_masks()
}
std::shared_ptr<const PackageIDSequence>
-ExndbamRepository::package_ids(const QualifiedPackageName & q) const
+ExndbamRepository::package_ids(const QualifiedPackageName & q,
+ const RepositoryContentMayExcludes &) const
{
std::shared_ptr<NDBAMEntrySequence> entries(_imp->ndbam.entries(q));
std::shared_ptr<PackageIDSequence> result(std::make_shared<PackageIDSequence>());
@@ -224,32 +225,37 @@ ExndbamRepository::package_ids(const QualifiedPackageName & q) const
}
std::shared_ptr<const QualifiedPackageNameSet>
-ExndbamRepository::package_names(const CategoryNamePart & c) const
+ExndbamRepository::package_names(const CategoryNamePart & c,
+ const RepositoryContentMayExcludes &) const
{
return _imp->ndbam.package_names(c);
}
std::shared_ptr<const CategoryNamePartSet>
-ExndbamRepository::category_names() const
+ExndbamRepository::category_names(
+ const RepositoryContentMayExcludes &) const
{
return _imp->ndbam.category_names();
}
std::shared_ptr<const CategoryNamePartSet>
ExndbamRepository::category_names_containing_package(
- const PackageNamePart & p) const
+ const PackageNamePart & p,
+ const RepositoryContentMayExcludes &) const
{
return _imp->ndbam.category_names_containing_package(p);
}
bool
-ExndbamRepository::has_package_named(const QualifiedPackageName & q) const
+ExndbamRepository::has_package_named(const QualifiedPackageName & q,
+ const RepositoryContentMayExcludes &) const
{
return _imp->ndbam.has_package_named(q);
}
bool
-ExndbamRepository::has_category_named(const CategoryNamePart & c) const
+ExndbamRepository::has_category_named(const CategoryNamePart & c,
+ const RepositoryContentMayExcludes &) const
{
return _imp->ndbam.has_category_named(c);
}
@@ -339,7 +345,7 @@ ExndbamRepository::merge(const MergeParams & m)
std::shared_ptr<const PackageID> if_overwritten_id, if_same_name_id;
{
- std::shared_ptr<const PackageIDSequence> ids(package_ids(m.package_id()->name()));
+ std::shared_ptr<const PackageIDSequence> ids(package_ids(m.package_id()->name(), { }));
for (PackageIDSequence::ConstIterator v(ids->begin()), v_end(ids->end()) ;
v != v_end ; ++v)
{
@@ -460,7 +466,7 @@ ExndbamRepository::merge(const MergeParams & m)
if (std::static_pointer_cast<const ERepositoryID>(m.package_id())
->eapi()->supported()->ebuild_phases()->ebuild_new_upgrade_phase_order())
{
- const std::shared_ptr<const PackageIDSequence> & replace_candidates(package_ids(m.package_id()->name()));
+ const std::shared_ptr<const PackageIDSequence> & replace_candidates(package_ids(m.package_id()->name(), { }));
for (PackageIDSequence::ConstIterator it(replace_candidates->begin()),
it_end(replace_candidates->end()); it_end != it; ++it)
{
diff --git a/paludis/repositories/e/exndbam_repository.hh b/paludis/repositories/e/exndbam_repository.hh
index 5ee7237a7..ea9800f2b 100644
--- a/paludis/repositories/e/exndbam_repository.hh
+++ b/paludis/repositories/e/exndbam_repository.hh
@@ -88,24 +88,30 @@ namespace paludis
/* Repository */
virtual std::shared_ptr<const PackageIDSequence> package_ids(
- const QualifiedPackageName &) const
+ const QualifiedPackageName &,
+ const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart &) const
+ const CategoryNamePart &,
+ const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(
+ const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
- const PackageNamePart &) const
+ const PackageNamePart &,
+ const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_package_named(const QualifiedPackageName &) const
+ virtual bool has_package_named(const QualifiedPackageName &,
+ const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_category_named(const CategoryNamePart &) const
+ virtual bool has_category_named(const CategoryNamePart &,
+ const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const bool is_unimportant() const;
diff --git a/paludis/repositories/e/exndbam_repository_TEST.cc b/paludis/repositories/e/exndbam_repository_TEST.cc
index c48ff4d27..cb644bbf7 100644
--- a/paludis/repositories/e/exndbam_repository_TEST.cc
+++ b/paludis/repositories/e/exndbam_repository_TEST.cc
@@ -152,7 +152,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(0, exndbam_repo);
- TEST_CHECK(exndbam_repo->package_ids(QualifiedPackageName("cat/pkg"))->empty());
+ TEST_CHECK(exndbam_repo->package_ids(QualifiedPackageName("cat/pkg"), { })->empty());
{
TestMessageSuffix suffix("install eapi 1", true);
@@ -160,7 +160,7 @@ namespace test_cases
install(env, exndbam_repo, "=cat/pkg-0::postinsttest", "");
exndbam_repo->invalidate();
- std::shared_ptr<const PackageIDSequence> ids(exndbam_repo->package_ids(QualifiedPackageName("cat/pkg")));
+ std::shared_ptr<const PackageIDSequence> ids(exndbam_repo->package_ids(QualifiedPackageName("cat/pkg"), { }));
TEST_CHECK_EQUAL(join(indirect_iterator(ids->begin()), indirect_iterator(ids->end()), " "), "cat/pkg-0::installed");
}
@@ -170,7 +170,7 @@ namespace test_cases
install(env, exndbam_repo, "=cat/pkg-0::postinsttest", "");
exndbam_repo->invalidate();
- std::shared_ptr<const PackageIDSequence> ids(exndbam_repo->package_ids(QualifiedPackageName("cat/pkg")));
+ std::shared_ptr<const PackageIDSequence> ids(exndbam_repo->package_ids(QualifiedPackageName("cat/pkg"), { }));
TEST_CHECK_EQUAL(join(indirect_iterator(ids->begin()), indirect_iterator(ids->end()), " "), "cat/pkg-0::installed");
}
@@ -180,7 +180,7 @@ namespace test_cases
install(env, exndbam_repo, "=cat/pkg-0.1::postinsttest", "=cat/pkg-0::installed");
exndbam_repo->invalidate();
- std::shared_ptr<const PackageIDSequence> ids2(exndbam_repo->package_ids(QualifiedPackageName("cat/pkg")));
+ std::shared_ptr<const PackageIDSequence> ids2(exndbam_repo->package_ids(QualifiedPackageName("cat/pkg"), { }));
TEST_CHECK_EQUAL(join(indirect_iterator(ids2->begin()), indirect_iterator(ids2->end()), " "), "cat/pkg-0.1::installed");
}
@@ -201,7 +201,7 @@ namespace test_cases
install(env, exndbam_repo, "=cat/pkg-1::postinsttest", "");
exndbam_repo->invalidate();
- std::shared_ptr<const PackageIDSequence> ids(exndbam_repo->package_ids(QualifiedPackageName("cat/pkg")));
+ std::shared_ptr<const PackageIDSequence> ids(exndbam_repo->package_ids(QualifiedPackageName("cat/pkg"), { }));
TEST_CHECK_EQUAL(join(indirect_iterator(ids->begin()), indirect_iterator(ids->end()), " "), "cat/pkg-1::installed");
}
@@ -211,7 +211,7 @@ namespace test_cases
install(env, exndbam_repo, "=cat/pkg-1.1::postinsttest", "=cat/pkg-1::installed");
exndbam_repo->invalidate();
- std::shared_ptr<const PackageIDSequence> ids(exndbam_repo->package_ids(QualifiedPackageName("cat/pkg")));
+ std::shared_ptr<const PackageIDSequence> ids(exndbam_repo->package_ids(QualifiedPackageName("cat/pkg"), { }));
TEST_CHECK_EQUAL(join(indirect_iterator(ids->begin()), indirect_iterator(ids->end()), " "), "cat/pkg-1.1::installed");
}
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index c8e19541e..01edb0009 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -200,7 +200,7 @@ VDBRepository::_add_metadata_keys() const
}
bool
-VDBRepository::has_category_named(const CategoryNamePart & c) const
+VDBRepository::has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -212,7 +212,7 @@ VDBRepository::has_category_named(const CategoryNamePart & c) const
}
bool
-VDBRepository::has_package_named(const QualifiedPackageName & q) const
+VDBRepository::has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -237,7 +237,7 @@ VDBRepository::is_unimportant() const
}
std::shared_ptr<const CategoryNamePartSet>
-VDBRepository::category_names() const
+VDBRepository::category_names(const RepositoryContentMayExcludes &) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -254,7 +254,7 @@ VDBRepository::category_names() const
}
std::shared_ptr<const QualifiedPackageNameSet>
-VDBRepository::package_names(const CategoryNamePart & c) const
+VDBRepository::package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes & x) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -264,7 +264,7 @@ VDBRepository::package_names(const CategoryNamePart & c) const
std::shared_ptr<QualifiedPackageNameSet> result(std::make_shared<QualifiedPackageNameSet>());
need_category_names();
- if (! has_category_named(c))
+ if (! has_category_named(c, x))
return std::make_shared<QualifiedPackageNameSet>();
need_package_ids(c);
@@ -273,7 +273,7 @@ VDBRepository::package_names(const CategoryNamePart & c) const
}
std::shared_ptr<const PackageIDSequence>
-VDBRepository::package_ids(const QualifiedPackageName & n) const
+VDBRepository::package_ids(const QualifiedPackageName & n, const RepositoryContentMayExcludes & x) const
{
Lock l(*_imp->big_nasty_mutex);
@@ -282,11 +282,11 @@ VDBRepository::package_ids(const QualifiedPackageName & n) const
need_category_names();
- if (! has_category_named(n.category()))
+ if (! has_category_named(n.category(), x))
return std::make_shared<PackageIDSequence>();
need_package_ids(n.category());
- if (! has_package_named(n))
+ if (! has_package_named(n, x))
return std::make_shared<PackageIDSequence>();
return _imp->ids.find(n)->second;
@@ -543,7 +543,7 @@ VDBRepository::perform_uninstall(
if (! a.options.is_overwrite())
{
- std::shared_ptr<const PackageIDSequence> ids(package_ids(id->name()));
+ std::shared_ptr<const PackageIDSequence> ids(package_ids(id->name(), { }));
bool only(true);
for (PackageIDSequence::ConstIterator it(ids->begin()),
it_end(ids->end()); it_end != it; ++it)
@@ -852,17 +852,17 @@ VDBRepository::regenerate_provides_cache() const
}
std::shared_ptr<const CategoryNamePartSet>
-VDBRepository::category_names_containing_package(const PackageNamePart & p) const
+VDBRepository::category_names_containing_package(const PackageNamePart & p, const RepositoryContentMayExcludes & x) const
{
Lock l(*_imp->big_nasty_mutex);
if (! _imp->names_cache->usable())
- return Repository::category_names_containing_package(p);
+ return Repository::category_names_containing_package(p, x);
std::shared_ptr<const CategoryNamePartSet> result(
_imp->names_cache->category_names_containing_package(p));
- return result ? result : Repository::category_names_containing_package(p);
+ return result ? result : Repository::category_names_containing_package(p, x);
}
namespace
@@ -1024,7 +1024,7 @@ VDBRepository::merge(const MergeParams & m)
if (std::static_pointer_cast<const ERepositoryID>(m.package_id())
->eapi()->supported()->ebuild_phases()->ebuild_new_upgrade_phase_order())
{
- const std::shared_ptr<const PackageIDSequence> & replace_candidates(package_ids(m.package_id()->name()));
+ const std::shared_ptr<const PackageIDSequence> & replace_candidates(package_ids(m.package_id()->name(), { }));
for (PackageIDSequence::ConstIterator it(replace_candidates->begin()),
it_end(replace_candidates->end()); it_end != it; ++it)
{
@@ -1147,7 +1147,7 @@ VDBRepository::package_id_if_exists(const QualifiedPackageName & q, const Versio
{
Lock l(*_imp->big_nasty_mutex);
- if (! has_package_named(q))
+ if (! has_package_named(q, { }))
return std::shared_ptr<const ERepositoryID>();
need_package_ids(q.category());
diff --git a/paludis/repositories/e/vdb_repository.hh b/paludis/repositories/e/vdb_repository.hh
index ec7ab4b77..f027e2bfc 100644
--- a/paludis/repositories/e/vdb_repository.hh
+++ b/paludis/repositories/e/vdb_repository.hh
@@ -136,24 +136,25 @@ namespace paludis
/* Repository */
virtual std::shared_ptr<const PackageIDSequence> package_ids(
- const QualifiedPackageName &) const
+ const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart &) const
+ const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(
+ const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
- const PackageNamePart &) const
+ const PackageNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_package_named(const QualifiedPackageName &) const
+ virtual bool has_package_named(const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_category_named(const CategoryNamePart &) const
+ virtual bool has_category_named(const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const bool is_unimportant() const;
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index 94712b831..2d4ec6939 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -127,9 +127,9 @@ namespace test_cases
std::shared_ptr<Repository> repo(VDBRepository::VDBRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- TEST_CHECK(repo->has_category_named(CategoryNamePart("cat-one")));
- TEST_CHECK(repo->has_category_named(CategoryNamePart("cat-two")));
- TEST_CHECK(! repo->has_category_named(CategoryNamePart("cat-three")));
+ TEST_CHECK(repo->has_category_named(CategoryNamePart("cat-one"), { }));
+ TEST_CHECK(repo->has_category_named(CategoryNamePart("cat-two"), { }));
+ TEST_CHECK(! repo->has_category_named(CategoryNamePart("cat-three"), { }));
}
} test_vdb_repository_has_category_named;
@@ -1177,7 +1177,7 @@ namespace test_cases
n::want_phase() = &want_all_phases
));
- TEST_CHECK(vdb_repo->package_ids(QualifiedPackageName("cat/pkg"))->empty());
+ TEST_CHECK(vdb_repo->package_ids(QualifiedPackageName("cat/pkg"), { })->empty());
{
TestMessageSuffix suffix("install", true);
@@ -1187,7 +1187,7 @@ namespace test_cases
id->perform_action(install_action);
vdb_repo->invalidate();
- std::shared_ptr<const PackageIDSequence> ids(vdb_repo->package_ids(QualifiedPackageName("cat/pkg")));
+ std::shared_ptr<const PackageIDSequence> ids(vdb_repo->package_ids(QualifiedPackageName("cat/pkg"), { }));
TEST_CHECK_EQUAL(join(indirect_iterator(ids->begin()), indirect_iterator(ids->end()), " "), "cat/pkg-1::installed");
}
@@ -1199,7 +1199,7 @@ namespace test_cases
id->perform_action(install_action);
vdb_repo->invalidate();
- std::shared_ptr<const PackageIDSequence> ids(vdb_repo->package_ids(QualifiedPackageName("cat/pkg")));
+ std::shared_ptr<const PackageIDSequence> ids(vdb_repo->package_ids(QualifiedPackageName("cat/pkg"), { }));
TEST_CHECK_EQUAL(join(indirect_iterator(ids->begin()), indirect_iterator(ids->end()), " "), "cat/pkg-1::installed");
}
@@ -1211,7 +1211,7 @@ namespace test_cases
id->perform_action(install_action);
vdb_repo->invalidate();
- std::shared_ptr<const PackageIDSequence> ids(vdb_repo->package_ids(QualifiedPackageName("cat/pkg")));
+ std::shared_ptr<const PackageIDSequence> ids(vdb_repo->package_ids(QualifiedPackageName("cat/pkg"), { }));
TEST_CHECK_EQUAL(join(indirect_iterator(ids->begin()), indirect_iterator(ids->end()), " "), "cat/pkg-1-r0::installed");
}
}
@@ -1284,7 +1284,7 @@ namespace test_cases
std::bind(from_keys, keys, std::placeholders::_1)));
env.package_database()->add_repository(0, vdb_repo);
- TEST_CHECK(vdb_repo->package_ids(QualifiedPackageName("cat/pkg"))->empty());
+ TEST_CHECK(vdb_repo->package_ids(QualifiedPackageName("cat/pkg"), { })->empty());
{
TestMessageSuffix suffix("install eapi 1", true);
@@ -1293,7 +1293,7 @@ namespace test_cases
install(env, vdb_repo, "=cat/pkg-0::postinsttest", "");
vdb_repo->invalidate();
- std::shared_ptr<const PackageIDSequence> ids(vdb_repo->package_ids(QualifiedPackageName("cat/pkg")));
+ std::shared_ptr<const PackageIDSequence> ids(vdb_repo->package_ids(QualifiedPackageName("cat/pkg"), { }));
TEST_CHECK_EQUAL(join(indirect_iterator(ids->begin()), indirect_iterator(ids->end()), " "), "cat/pkg-0::installed");
}
@@ -1304,7 +1304,7 @@ namespace test_cases
install(env, vdb_repo, "=cat/pkg-0::postinsttest", "");
vdb_repo->invalidate();
- std::shared_ptr<const PackageIDSequence> ids(vdb_repo->package_ids(QualifiedPackageName("cat/pkg")));
+ std::shared_ptr<const PackageIDSequence> ids(vdb_repo->package_ids(QualifiedPackageName("cat/pkg"), { }));
TEST_CHECK_EQUAL(join(indirect_iterator(ids->begin()), indirect_iterator(ids->end()), " "), "cat/pkg-0::installed");
}
@@ -1315,7 +1315,7 @@ namespace test_cases
install(env, vdb_repo, "=cat/pkg-0.1::postinsttest", "=cat/pkg-0::installed");
vdb_repo->invalidate();
- std::shared_ptr<const PackageIDSequence> ids2(vdb_repo->package_ids(QualifiedPackageName("cat/pkg")));
+ std::shared_ptr<const PackageIDSequence> ids2(vdb_repo->package_ids(QualifiedPackageName("cat/pkg"), { }));
TEST_CHECK_EQUAL(join(indirect_iterator(ids2->begin()), indirect_iterator(ids2->end()), " "), "cat/pkg-0.1::installed");
}
@@ -1338,7 +1338,7 @@ namespace test_cases
install(env, vdb_repo, "=cat/pkg-1::postinsttest", "");
vdb_repo->invalidate();
- std::shared_ptr<const PackageIDSequence> ids(vdb_repo->package_ids(QualifiedPackageName("cat/pkg")));
+ std::shared_ptr<const PackageIDSequence> ids(vdb_repo->package_ids(QualifiedPackageName("cat/pkg"), { }));
TEST_CHECK_EQUAL(join(indirect_iterator(ids->begin()), indirect_iterator(ids->end()), " "), "cat/pkg-1::installed");
}
@@ -1349,7 +1349,7 @@ namespace test_cases
install(env, vdb_repo, "=cat/pkg-1.1::postinsttest", "=cat/pkg-1::installed");
vdb_repo->invalidate();
- std::shared_ptr<const PackageIDSequence> ids(vdb_repo->package_ids(QualifiedPackageName("cat/pkg")));
+ std::shared_ptr<const PackageIDSequence> ids(vdb_repo->package_ids(QualifiedPackageName("cat/pkg"), { }));
TEST_CHECK_EQUAL(join(indirect_iterator(ids->begin()), indirect_iterator(ids->end()), " "), "cat/pkg-1.1::installed");
}
diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc
index ca40effdf..16c1d94f2 100644
--- a/paludis/repositories/fake/fake_installed_repository.cc
+++ b/paludis/repositories/fake/fake_installed_repository.cc
@@ -87,15 +87,15 @@ FakeInstalledRepository::provided_packages() const
{
std::shared_ptr<ProvidesSequence> result(std::make_shared<ProvidesSequence>());
- std::shared_ptr<const CategoryNamePartSet> cats(category_names());
+ std::shared_ptr<const CategoryNamePartSet> cats(category_names({ }));
for (CategoryNamePartSet::ConstIterator c(cats->begin()), c_end(cats->end()) ;
c != c_end ; ++c)
{
- std::shared_ptr<const QualifiedPackageNameSet> pkgs(package_names(*c));
+ std::shared_ptr<const QualifiedPackageNameSet> pkgs(package_names(*c, { }));
for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()), p_end(pkgs->end()) ;
p != p_end ; ++p)
{
- std::shared_ptr<const PackageIDSequence> vers(package_ids(*p));
+ std::shared_ptr<const PackageIDSequence> vers(package_ids(*p, { }));
for (PackageIDSequence::ConstIterator v(vers->begin()), v_end(vers->end()) ;
v != v_end ; ++v)
{
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index 6e0663a0b..edfc7f46f 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -73,30 +73,30 @@ FakeRepositoryBase::~FakeRepositoryBase()
}
bool
-FakeRepositoryBase::has_category_named(const CategoryNamePart & c) const
+FakeRepositoryBase::has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return (_imp->category_names->end() != _imp->category_names->find(c));
}
bool
-FakeRepositoryBase::has_package_named(const QualifiedPackageName & q) const
+FakeRepositoryBase::has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes & x) const
{
- return has_category_named(q.category()) &&
+ return has_category_named(q.category(), x) &&
(_imp->package_names.find(q.category())->second->end() !=
_imp->package_names.find(q.category())->second->find(q.package()));
}
std::shared_ptr<const CategoryNamePartSet>
-FakeRepositoryBase::category_names() const
+FakeRepositoryBase::category_names(const RepositoryContentMayExcludes &) const
{
return _imp->category_names;
}
std::shared_ptr<const QualifiedPackageNameSet>
-FakeRepositoryBase::package_names(const CategoryNamePart & c) const
+FakeRepositoryBase::package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes & x) const
{
std::shared_ptr<QualifiedPackageNameSet> result(std::make_shared<QualifiedPackageNameSet>());
- if (! has_category_named(c))
+ if (! has_category_named(c, x))
return result;
PackageNamePartSet::ConstIterator p(_imp->package_names.find(c)->second->begin()),
@@ -107,11 +107,11 @@ FakeRepositoryBase::package_names(const CategoryNamePart & c) const
}
std::shared_ptr<const PackageIDSequence>
-FakeRepositoryBase::package_ids(const QualifiedPackageName & n) const
+FakeRepositoryBase::package_ids(const QualifiedPackageName & n, const RepositoryContentMayExcludes & x) const
{
- if (! has_category_named(n.category()))
+ if (! has_category_named(n.category(), x))
return std::make_shared<PackageIDSequence>();
- if (! has_package_named(n))
+ if (! has_package_named(n, x))
return std::make_shared<PackageIDSequence>();
return _imp->ids.find(n)->second;
}
diff --git a/paludis/repositories/fake/fake_repository_base.hh b/paludis/repositories/fake/fake_repository_base.hh
index 4e4d647c8..2abfd0842 100644
--- a/paludis/repositories/fake/fake_repository_base.hh
+++ b/paludis/repositories/fake/fake_repository_base.hh
@@ -100,20 +100,20 @@ namespace paludis
/* Repository */
virtual std::shared_ptr<const PackageIDSequence> package_ids(
- const QualifiedPackageName &) const
+ const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart &) const
+ const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_package_named(const QualifiedPackageName &) const
+ virtual bool has_package_named(const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_category_named(const CategoryNamePart &) const
+ virtual bool has_category_named(const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool sync(const std::string &, const std::shared_ptr<OutputManager> &) const;
diff --git a/paludis/repositories/gemcutter/gemcutter_repository.cc b/paludis/repositories/gemcutter/gemcutter_repository.cc
index 48abd7201..073949dfb 100644
--- a/paludis/repositories/gemcutter/gemcutter_repository.cc
+++ b/paludis/repositories/gemcutter/gemcutter_repository.cc
@@ -156,43 +156,43 @@ GemcutterRepository::invalidate_masks()
}
bool
-GemcutterRepository::has_category_named(const CategoryNamePart & c) const
+GemcutterRepository::has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return _imp->store->has_category_named(c);
}
bool
-GemcutterRepository::has_package_named(const QualifiedPackageName & q) const
+GemcutterRepository::has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const
{
return _imp->store->has_package_named(q);
}
std::shared_ptr<const CategoryNamePartSet>
-GemcutterRepository::category_names() const
+GemcutterRepository::category_names(const RepositoryContentMayExcludes &) const
{
return _imp->store->category_names();
}
std::shared_ptr<const CategoryNamePartSet>
-GemcutterRepository::unimportant_category_names() const
+GemcutterRepository::unimportant_category_names(const RepositoryContentMayExcludes &) const
{
return _imp->store->unimportant_category_names();
}
std::shared_ptr<const CategoryNamePartSet>
-GemcutterRepository::category_names_containing_package(const PackageNamePart & p) const
+GemcutterRepository::category_names_containing_package(const PackageNamePart & p, const RepositoryContentMayExcludes & x) const
{
- return Repository::category_names_containing_package(p);
+ return Repository::category_names_containing_package(p, x);
}
std::shared_ptr<const QualifiedPackageNameSet>
-GemcutterRepository::package_names(const CategoryNamePart & c) const
+GemcutterRepository::package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return _imp->store->package_names(c);
}
std::shared_ptr<const PackageIDSequence>
-GemcutterRepository::package_ids(const QualifiedPackageName & p) const
+GemcutterRepository::package_ids(const QualifiedPackageName & p, const RepositoryContentMayExcludes &) const
{
return _imp->store->package_ids(p);
}
diff --git a/paludis/repositories/gemcutter/gemcutter_repository.hh b/paludis/repositories/gemcutter/gemcutter_repository.hh
index d6897c8cf..e2910cebb 100644
--- a/paludis/repositories/gemcutter/gemcutter_repository.hh
+++ b/paludis/repositories/gemcutter/gemcutter_repository.hh
@@ -77,13 +77,13 @@ namespace paludis
virtual const std::shared_ptr<const MetadataValueKey<std::string> > accept_keywords_key() const;
virtual const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > sync_host_key() const;
- virtual bool has_category_named(const CategoryNamePart & c) const;
- virtual bool has_package_named(const QualifiedPackageName & q) const;
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const;
- virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names() const;
- virtual std::shared_ptr<const CategoryNamePartSet> category_names_containing_package(const PackageNamePart & p) const;
- virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(const CategoryNamePart & c) const;
- virtual std::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p) const;
+ virtual bool has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const;
+ virtual bool has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names(const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names_containing_package(const PackageNamePart & p, const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p, const RepositoryContentMayExcludes &) const;
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
virtual bool some_ids_might_not_be_masked() const;
diff --git a/paludis/repositories/repository/repository_repository.cc b/paludis/repositories/repository/repository_repository.cc
index bd30f8a08..388d5c3c9 100644
--- a/paludis/repositories/repository/repository_repository.cc
+++ b/paludis/repositories/repository/repository_repository.cc
@@ -168,43 +168,43 @@ RepositoryRepository::invalidate_masks()
}
bool
-RepositoryRepository::has_category_named(const CategoryNamePart & c) const
+RepositoryRepository::has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return _imp->store->has_category_named(c);
}
bool
-RepositoryRepository::has_package_named(const QualifiedPackageName & q) const
+RepositoryRepository::has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const
{
return _imp->store->has_package_named(q);
}
std::shared_ptr<const CategoryNamePartSet>
-RepositoryRepository::category_names() const
+RepositoryRepository::category_names(const RepositoryContentMayExcludes &) const
{
return _imp->store->category_names();
}
std::shared_ptr<const CategoryNamePartSet>
-RepositoryRepository::unimportant_category_names() const
+RepositoryRepository::unimportant_category_names(const RepositoryContentMayExcludes &) const
{
return _imp->store->unimportant_category_names();
}
std::shared_ptr<const CategoryNamePartSet>
-RepositoryRepository::category_names_containing_package(const PackageNamePart & p) const
+RepositoryRepository::category_names_containing_package(const PackageNamePart & p, const RepositoryContentMayExcludes & x) const
{
- return Repository::category_names_containing_package(p);
+ return Repository::category_names_containing_package(p, x);
}
std::shared_ptr<const QualifiedPackageNameSet>
-RepositoryRepository::package_names(const CategoryNamePart & c) const
+RepositoryRepository::package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return _imp->store->package_names(c);
}
std::shared_ptr<const PackageIDSequence>
-RepositoryRepository::package_ids(const QualifiedPackageName & p) const
+RepositoryRepository::package_ids(const QualifiedPackageName & p, const RepositoryContentMayExcludes &) const
{
return _imp->store->package_ids(p);
}
diff --git a/paludis/repositories/repository/repository_repository.hh b/paludis/repositories/repository/repository_repository.hh
index 4a7ab3c76..73bea03e4 100644
--- a/paludis/repositories/repository/repository_repository.hh
+++ b/paludis/repositories/repository/repository_repository.hh
@@ -81,15 +81,15 @@ namespace paludis
virtual const std::shared_ptr<const MetadataValueKey<std::string> > accept_keywords_key() const;
virtual const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > sync_host_key() const;
- virtual bool has_category_named(const CategoryNamePart & c) const;
- virtual bool has_package_named(const QualifiedPackageName & q) const;
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const;
- virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names() const;
+ virtual bool has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const;
+ virtual bool has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names(const RepositoryContentMayExcludes &) const;
virtual std::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
- const PackageNamePart & p) const;
+ const PackageNamePart & p, const RepositoryContentMayExcludes &) const;
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart & c) const;
- virtual std::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p) const;
+ const CategoryNamePart & c, const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p, const RepositoryContentMayExcludes &) const;
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
virtual bool some_ids_might_not_be_masked() const;
diff --git a/paludis/repositories/unavailable/unavailable_repository.cc b/paludis/repositories/unavailable/unavailable_repository.cc
index 7698241b2..522ec11e5 100644
--- a/paludis/repositories/unavailable/unavailable_repository.cc
+++ b/paludis/repositories/unavailable/unavailable_repository.cc
@@ -170,43 +170,43 @@ UnavailableRepository::invalidate_masks()
}
bool
-UnavailableRepository::has_category_named(const CategoryNamePart & c) const
+UnavailableRepository::has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return _imp->store->has_category_named(c);
}
bool
-UnavailableRepository::has_package_named(const QualifiedPackageName & q) const
+UnavailableRepository::has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const
{
return _imp->store->has_package_named(q);
}
std::shared_ptr<const CategoryNamePartSet>
-UnavailableRepository::category_names() const
+UnavailableRepository::category_names(const RepositoryContentMayExcludes &) const
{
return _imp->store->category_names();
}
std::shared_ptr<const CategoryNamePartSet>
-UnavailableRepository::unimportant_category_names() const
+UnavailableRepository::unimportant_category_names(const RepositoryContentMayExcludes &) const
{
return _imp->store->unimportant_category_names();
}
std::shared_ptr<const CategoryNamePartSet>
-UnavailableRepository::category_names_containing_package(const PackageNamePart & p) const
+UnavailableRepository::category_names_containing_package(const PackageNamePart & p, const RepositoryContentMayExcludes & x) const
{
- return Repository::category_names_containing_package(p);
+ return Repository::category_names_containing_package(p, x);
}
std::shared_ptr<const QualifiedPackageNameSet>
-UnavailableRepository::package_names(const CategoryNamePart & c) const
+UnavailableRepository::package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return _imp->store->package_names(c);
}
std::shared_ptr<const PackageIDSequence>
-UnavailableRepository::package_ids(const QualifiedPackageName & p) const
+UnavailableRepository::package_ids(const QualifiedPackageName & p, const RepositoryContentMayExcludes &) const
{
return _imp->store->package_ids(p);
}
diff --git a/paludis/repositories/unavailable/unavailable_repository.hh b/paludis/repositories/unavailable/unavailable_repository.hh
index c05b18fb6..140d5c1cb 100644
--- a/paludis/repositories/unavailable/unavailable_repository.hh
+++ b/paludis/repositories/unavailable/unavailable_repository.hh
@@ -80,15 +80,15 @@ namespace paludis
virtual const std::shared_ptr<const MetadataValueKey<std::string> > accept_keywords_key() const;
virtual const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > sync_host_key() const;
- virtual bool has_category_named(const CategoryNamePart & c) const;
- virtual bool has_package_named(const QualifiedPackageName & q) const;
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const;
- virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names() const;
+ virtual bool has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const;
+ virtual bool has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names(const RepositoryContentMayExcludes &) const;
virtual std::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
- const PackageNamePart & p) const;
+ const PackageNamePart & p, const RepositoryContentMayExcludes &) const;
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart & c) const;
- virtual std::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p) const;
+ const CategoryNamePart & c, const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p, const RepositoryContentMayExcludes &) const;
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
virtual bool some_ids_might_not_be_masked() const;
diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc
index a6a8056eb..e703515b4 100644
--- a/paludis/repositories/unpackaged/installed_id.cc
+++ b/paludis/repositories/unpackaged/installed_id.cc
@@ -834,7 +834,7 @@ InstalledUnpackagedID::uninstall(const bool replace,
bool last((! replace) && (! if_for_install_id));
if (last)
{
- std::shared_ptr<const PackageIDSequence> ids(repo->package_ids(name()));
+ std::shared_ptr<const PackageIDSequence> ids(repo->package_ids(name(), { }));
for (PackageIDSequence::ConstIterator v(ids->begin()), v_end(ids->end()) ;
v != v_end ; ++v)
if (**v != *this)
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index 66a8bd125..a2daa15fa 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -118,7 +118,7 @@ InstalledUnpackagedRepository::_add_metadata_keys() const
}
std::shared_ptr<const PackageIDSequence>
-InstalledUnpackagedRepository::package_ids(const QualifiedPackageName & q) const
+InstalledUnpackagedRepository::package_ids(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const
{
std::shared_ptr<NDBAMEntrySequence> entries(_imp->ndbam.entries(q));
std::shared_ptr<PackageIDSequence> result(std::make_shared<PackageIDSequence>());
@@ -137,32 +137,32 @@ InstalledUnpackagedRepository::package_ids(const QualifiedPackageName & q) const
}
std::shared_ptr<const QualifiedPackageNameSet>
-InstalledUnpackagedRepository::package_names(const CategoryNamePart & c) const
+InstalledUnpackagedRepository::package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return _imp->ndbam.package_names(c);
}
std::shared_ptr<const CategoryNamePartSet>
-InstalledUnpackagedRepository::category_names() const
+InstalledUnpackagedRepository::category_names(const RepositoryContentMayExcludes &) const
{
return _imp->ndbam.category_names();
}
std::shared_ptr<const CategoryNamePartSet>
InstalledUnpackagedRepository::category_names_containing_package(
- const PackageNamePart & p) const
+ const PackageNamePart & p, const RepositoryContentMayExcludes &) const
{
return _imp->ndbam.category_names_containing_package(p);
}
bool
-InstalledUnpackagedRepository::has_package_named(const QualifiedPackageName & q) const
+InstalledUnpackagedRepository::has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const
{
return _imp->ndbam.has_package_named(q);
}
bool
-InstalledUnpackagedRepository::has_category_named(const CategoryNamePart & c) const
+InstalledUnpackagedRepository::has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return _imp->ndbam.has_category_named(c);
}
@@ -298,7 +298,7 @@ InstalledUnpackagedRepository::merge(const MergeParams & m)
std::shared_ptr<const PackageID> if_overwritten_id, if_same_name_id;
{
- std::shared_ptr<const PackageIDSequence> ids(package_ids(m.package_id()->name()));
+ std::shared_ptr<const PackageIDSequence> ids(package_ids(m.package_id()->name(), { }));
for (PackageIDSequence::ConstIterator v(ids->begin()), v_end(ids->end()) ;
v != v_end ; ++v)
{
diff --git a/paludis/repositories/unpackaged/installed_repository.hh b/paludis/repositories/unpackaged/installed_repository.hh
index e93370425..6180fea10 100644
--- a/paludis/repositories/unpackaged/installed_repository.hh
+++ b/paludis/repositories/unpackaged/installed_repository.hh
@@ -80,24 +80,24 @@ namespace paludis
void deindex(const QualifiedPackageName &) const;
virtual std::shared_ptr<const PackageIDSequence> package_ids(
- const QualifiedPackageName &) const
+ const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart &) const
+ const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
- const PackageNamePart &) const
+ const PackageNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_package_named(const QualifiedPackageName &) const
+ virtual bool has_package_named(const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_category_named(const CategoryNamePart &) const
+ virtual bool has_category_named(const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc
index b3ec19609..48ee616c1 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository.cc
@@ -127,37 +127,37 @@ UnpackagedRepository::_add_metadata_keys() const
}
std::shared_ptr<const PackageIDSequence>
-UnpackagedRepository::package_ids(const QualifiedPackageName & n) const
+UnpackagedRepository::package_ids(const QualifiedPackageName & n, const RepositoryContentMayExcludes &) const
{
return n == _imp->id->name() ? _imp->ids : std::make_shared<PackageIDSequence>();
}
std::shared_ptr<const QualifiedPackageNameSet>
-UnpackagedRepository::package_names(const CategoryNamePart & c) const
+UnpackagedRepository::package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return c == _imp->id->name().category() ? _imp->package_names : std::make_shared<QualifiedPackageNameSet>();
}
std::shared_ptr<const CategoryNamePartSet>
-UnpackagedRepository::category_names() const
+UnpackagedRepository::category_names(const RepositoryContentMayExcludes &) const
{
return _imp->category_names;
}
std::shared_ptr<const CategoryNamePartSet>
-UnpackagedRepository::category_names_containing_package(const PackageNamePart & p) const
+UnpackagedRepository::category_names_containing_package(const PackageNamePart & p, const RepositoryContentMayExcludes &) const
{
return p == _imp->id->name().package() ? _imp->category_names : std::make_shared<CategoryNamePartSet>();
}
bool
-UnpackagedRepository::has_package_named(const QualifiedPackageName & q) const
+UnpackagedRepository::has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const
{
return q == _imp->id->name();
}
bool
-UnpackagedRepository::has_category_named(const CategoryNamePart & c) const
+UnpackagedRepository::has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return c == _imp->id->name().category();
}
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.hh b/paludis/repositories/unpackaged/unpackaged_repository.hh
index ad0efaa88..e758c900d 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.hh
+++ b/paludis/repositories/unpackaged/unpackaged_repository.hh
@@ -84,24 +84,24 @@ namespace paludis
virtual void invalidate_masks();
virtual std::shared_ptr<const PackageIDSequence> package_ids(
- const QualifiedPackageName &) const
+ const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart &) const
+ const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
- const PackageNamePart &) const
+ const PackageNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_package_named(const QualifiedPackageName &) const
+ virtual bool has_package_named(const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_category_named(const CategoryNamePart &) const
+ virtual bool has_category_named(const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
diff --git a/paludis/repositories/unwritten/unwritten_repository.cc b/paludis/repositories/unwritten/unwritten_repository.cc
index 2e393ea3d..94cd46b06 100644
--- a/paludis/repositories/unwritten/unwritten_repository.cc
+++ b/paludis/repositories/unwritten/unwritten_repository.cc
@@ -171,43 +171,43 @@ UnwrittenRepository::invalidate_masks()
}
bool
-UnwrittenRepository::has_category_named(const CategoryNamePart & c) const
+UnwrittenRepository::has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return _imp->store->has_category_named(c);
}
bool
-UnwrittenRepository::has_package_named(const QualifiedPackageName & q) const
+UnwrittenRepository::has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const
{
return _imp->store->has_package_named(q);
}
std::shared_ptr<const CategoryNamePartSet>
-UnwrittenRepository::category_names() const
+UnwrittenRepository::category_names(const RepositoryContentMayExcludes &) const
{
return _imp->store->category_names();
}
std::shared_ptr<const CategoryNamePartSet>
-UnwrittenRepository::unimportant_category_names() const
+UnwrittenRepository::unimportant_category_names(const RepositoryContentMayExcludes &) const
{
return _imp->store->unimportant_category_names();
}
std::shared_ptr<const CategoryNamePartSet>
-UnwrittenRepository::category_names_containing_package(const PackageNamePart & p) const
+UnwrittenRepository::category_names_containing_package(const PackageNamePart & p, const RepositoryContentMayExcludes & x) const
{
- return Repository::category_names_containing_package(p);
+ return Repository::category_names_containing_package(p, x);
}
std::shared_ptr<const QualifiedPackageNameSet>
-UnwrittenRepository::package_names(const CategoryNamePart & c) const
+UnwrittenRepository::package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return _imp->store->package_names(c);
}
std::shared_ptr<const PackageIDSequence>
-UnwrittenRepository::package_ids(const QualifiedPackageName & p) const
+UnwrittenRepository::package_ids(const QualifiedPackageName & p, const RepositoryContentMayExcludes &) const
{
return _imp->store->package_ids(p);
}
diff --git a/paludis/repositories/unwritten/unwritten_repository.hh b/paludis/repositories/unwritten/unwritten_repository.hh
index 46cd1d5cd..ecd914ba4 100644
--- a/paludis/repositories/unwritten/unwritten_repository.hh
+++ b/paludis/repositories/unwritten/unwritten_repository.hh
@@ -79,15 +79,15 @@ namespace paludis
virtual const std::shared_ptr<const MetadataValueKey<std::string> > accept_keywords_key() const;
virtual const std::shared_ptr<const MetadataCollectionKey<Map<std::string, std::string> > > sync_host_key() const;
- virtual bool has_category_named(const CategoryNamePart & c) const;
- virtual bool has_package_named(const QualifiedPackageName & q) const;
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const;
- virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names() const;
+ virtual bool has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const;
+ virtual bool has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names(const RepositoryContentMayExcludes &) const;
virtual std::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
- const PackageNamePart & p) const;
+ const PackageNamePart & p, const RepositoryContentMayExcludes &) const;
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart & c) const;
- virtual std::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p) const;
+ const CategoryNamePart & c, const RepositoryContentMayExcludes &) const;
+ virtual std::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p, const RepositoryContentMayExcludes &) const;
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
virtual bool some_ids_might_not_be_masked() const;
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index 8d22042fa..06f223bc9 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -163,7 +163,7 @@ InstalledVirtualsRepository::need_ids() const
}
std::shared_ptr<const PackageIDSequence>
-InstalledVirtualsRepository::package_ids(const QualifiedPackageName & q) const
+InstalledVirtualsRepository::package_ids(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const
{
if (q.category().value() != "virtual")
return std::make_shared<PackageIDSequence>();
@@ -178,7 +178,7 @@ InstalledVirtualsRepository::package_ids(const QualifiedPackageName & q) const
}
std::shared_ptr<const QualifiedPackageNameSet>
-InstalledVirtualsRepository::package_names(const CategoryNamePart & c) const
+InstalledVirtualsRepository::package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
if (c.value() != "virtual")
return std::make_shared<QualifiedPackageNameSet>();
@@ -193,7 +193,7 @@ InstalledVirtualsRepository::package_names(const CategoryNamePart & c) const
}
std::shared_ptr<const CategoryNamePartSet>
-InstalledVirtualsRepository::category_names() const
+InstalledVirtualsRepository::category_names(const RepositoryContentMayExcludes &) const
{
std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
result->insert(CategoryNamePart("virtual"));
@@ -201,7 +201,7 @@ InstalledVirtualsRepository::category_names() const
}
bool
-InstalledVirtualsRepository::has_package_named(const QualifiedPackageName & q) const
+InstalledVirtualsRepository::has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const
{
if (q.category().value() != "virtual")
return false;
@@ -212,7 +212,7 @@ InstalledVirtualsRepository::has_package_named(const QualifiedPackageName & q) c
}
bool
-InstalledVirtualsRepository::has_category_named(const CategoryNamePart & c) const
+InstalledVirtualsRepository::has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return (c.value() == "virtual");
}
@@ -304,7 +304,7 @@ InstalledVirtualsRepository::some_ids_might_not_be_masked() const
}
std::shared_ptr<const CategoryNamePartSet>
-InstalledVirtualsRepository::unimportant_category_names() const
+InstalledVirtualsRepository::unimportant_category_names(const RepositoryContentMayExcludes &) const
{
std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
result->insert(CategoryNamePart("virtual"));
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.hh b/paludis/repositories/virtuals/installed_virtuals_repository.hh
index 615e6f9c5..d946e217c 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.hh
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.hh
@@ -73,7 +73,8 @@ namespace paludis
///\}
- virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names() const;
+ virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names(
+ const RepositoryContentMayExcludes &) const;
virtual void invalidate();
@@ -89,20 +90,20 @@ namespace paludis
/* Repository */
virtual std::shared_ptr<const PackageIDSequence> package_ids(
- const QualifiedPackageName &) const
+ const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart &) const
+ const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_package_named(const QualifiedPackageName &) const
+ virtual bool has_package_named(const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_category_named(const CategoryNamePart &) const
+ virtual bool has_category_named(const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 8d9340f6c..c2270aed2 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -248,7 +248,7 @@ VirtualsRepository::need_ids() const
}
std::shared_ptr<const PackageIDSequence>
-VirtualsRepository::package_ids(const QualifiedPackageName & q) const
+VirtualsRepository::package_ids(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const
{
if (q.category().value() != "virtual")
return std::make_shared<PackageIDSequence>();
@@ -263,7 +263,7 @@ VirtualsRepository::package_ids(const QualifiedPackageName & q) const
}
std::shared_ptr<const QualifiedPackageNameSet>
-VirtualsRepository::package_names(const CategoryNamePart & c) const
+VirtualsRepository::package_names(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
if (c.value() != "virtual")
return std::make_shared<QualifiedPackageNameSet>();
@@ -278,7 +278,7 @@ VirtualsRepository::package_names(const CategoryNamePart & c) const
}
std::shared_ptr<const CategoryNamePartSet>
-VirtualsRepository::category_names() const
+VirtualsRepository::category_names(const RepositoryContentMayExcludes &) const
{
std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
result->insert(CategoryNamePart("virtual"));
@@ -286,7 +286,7 @@ VirtualsRepository::category_names() const
}
bool
-VirtualsRepository::has_package_named(const QualifiedPackageName & q) const
+VirtualsRepository::has_package_named(const QualifiedPackageName & q, const RepositoryContentMayExcludes &) const
{
if (q.category().value() != "virtual")
return false;
@@ -304,7 +304,7 @@ VirtualsRepository::has_package_named(const QualifiedPackageName & q) const
}
bool
-VirtualsRepository::has_category_named(const CategoryNamePart & c) const
+VirtualsRepository::has_category_named(const CategoryNamePart & c, const RepositoryContentMayExcludes &) const
{
return (c.value() == "virtual");
}
@@ -405,7 +405,7 @@ VirtualsRepository::some_ids_might_not_be_masked() const
}
std::shared_ptr<const CategoryNamePartSet>
-VirtualsRepository::unimportant_category_names() const
+VirtualsRepository::unimportant_category_names(const RepositoryContentMayExcludes &) const
{
std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
result->insert(CategoryNamePart("virtual"));
diff --git a/paludis/repositories/virtuals/virtuals_repository.hh b/paludis/repositories/virtuals/virtuals_repository.hh
index 048bc9e3d..e1029609a 100644
--- a/paludis/repositories/virtuals/virtuals_repository.hh
+++ b/paludis/repositories/virtuals/virtuals_repository.hh
@@ -73,7 +73,8 @@ namespace paludis
///\}
- virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names() const;
+ virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names(
+ const RepositoryContentMayExcludes &) const;
virtual void invalidate();
@@ -86,20 +87,21 @@ namespace paludis
/* Repository */
virtual std::shared_ptr<const PackageIDSequence> package_ids(
- const QualifiedPackageName &) const
+ const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart &) const
+ const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(
+ const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_package_named(const QualifiedPackageName &) const
+ virtual bool has_package_named(const QualifiedPackageName &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool has_category_named(const CategoryNamePart &) const
+ virtual bool has_category_named(const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
diff --git a/paludis/repositories/virtuals/virtuals_repository_TEST.cc b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
index 48cbbe15a..6c27e44a3 100644
--- a/paludis/repositories/virtuals/virtuals_repository_TEST.cc
+++ b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 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
@@ -76,8 +76,8 @@ namespace test_cases
TEST_CHECK(bool(repo->virtual_packages()));
TEST_CHECK_EQUAL(std::distance(repo->virtual_packages()->begin(), repo->virtual_packages()->end()), 1);
- TEST_CHECK(virtuals->has_category_named(CategoryNamePart("virtual")));
- TEST_CHECK(virtuals->has_package_named(QualifiedPackageName("virtual/pkg")));
+ TEST_CHECK(virtuals->has_category_named(CategoryNamePart("virtual"), { }));
+ TEST_CHECK(virtuals->has_package_named(QualifiedPackageName("virtual/pkg"), { }));
std::shared_ptr<const PackageIDSequence> r(env[selection::AllVersionsSorted(generator::All())]);
TEST_CHECK_STRINGIFY_EQUAL(join(indirect_iterator(r->begin()), indirect_iterator(r->end()), " | "),
@@ -126,8 +126,8 @@ namespace test_cases
repo2->add_virtual_package(QualifiedPackageName("virtual/foo"), std::make_shared<PackageDepSpec>(
parse_user_package_dep_spec("<=cat/pkg-1", &env, { })));
- TEST_CHECK(virtuals->has_category_named(CategoryNamePart("virtual")));
- TEST_CHECK(virtuals->has_package_named(QualifiedPackageName("virtual/pkg")));
+ TEST_CHECK(virtuals->has_category_named(CategoryNamePart("virtual"), { }));
+ TEST_CHECK(virtuals->has_package_named(QualifiedPackageName("virtual/pkg"), { }));
std::shared_ptr<const PackageIDSequence> r(env[selection::AllVersionsSorted(generator::All())]);
TEST_CHECK_STRINGIFY_EQUAL(join(indirect_iterator(r->begin()), indirect_iterator(r->end()), " | "),
@@ -167,8 +167,8 @@ namespace test_cases
repo2->add_virtual_package(QualifiedPackageName("virtual/pkg"), std::make_shared<PackageDepSpec>(
parse_user_package_dep_spec("virtual/pkg", &env, { })));
- TEST_CHECK(virtuals->has_category_named(CategoryNamePart("virtual")));
- TEST_CHECK(virtuals->has_package_named(QualifiedPackageName("virtual/pkg")));
+ TEST_CHECK(virtuals->has_category_named(CategoryNamePart("virtual"), { }));
+ TEST_CHECK(virtuals->has_package_named(QualifiedPackageName("virtual/pkg"), { }));
std::shared_ptr<const PackageIDSequence> r(env[selection::AllVersionsSorted(generator::All())]);
TEST_CHECK_STRINGIFY_EQUAL(join(indirect_iterator(r->begin()), indirect_iterator(r->end()), " | "),
diff --git a/paludis/repository-fwd.hh b/paludis/repository-fwd.hh
index 4c60666d1..1be58a753 100644
--- a/paludis/repository-fwd.hh
+++ b/paludis/repository-fwd.hh
@@ -21,8 +21,10 @@
#define PALUDIS_GUARD_PALUDIS_REPOSITORY_FWD_HH 1
#include <paludis/util/set-fwd.hh>
+#include <paludis/util/options-fwd.hh>
#include <paludis/repository-fwd.hh>
#include <memory>
+#include <iosfwd>
/** \file
* Forward declarations for paludis/repository.hh .
@@ -47,6 +49,10 @@ namespace paludis
class RepositoryManifestInterface;
struct MergeParams;
+
+#include <paludis/repository-se.hh>
+
+ typedef Options<RepositoryContentMayExclude> RepositoryContentMayExcludes;
}
#endif
diff --git a/paludis/repository.cc b/paludis/repository.cc
index 1e9f29a72..0805592f2 100644
--- a/paludis/repository.cc
+++ b/paludis/repository.cc
@@ -43,6 +43,8 @@
using namespace paludis;
+#include <paludis/repository-se.cc>
+
template class Set<std::shared_ptr<Repository> >;
template class WrappedForwardIterator<Set<std::shared_ptr<Repository> >::ConstIteratorTag, const std::shared_ptr<Repository> >;
template class WrappedOutputIterator<Set<std::shared_ptr<Repository> >::InserterTag, std::shared_ptr<Repository> >;
@@ -155,15 +157,15 @@ Repository::name() const
}
std::shared_ptr<const CategoryNamePartSet>
-Repository::category_names_containing_package(const PackageNamePart & p) const
+Repository::category_names_containing_package(const PackageNamePart & p, const RepositoryContentMayExcludes &) const
{
Context context("When finding category names containing package '" + stringify(p) + "':");
std::shared_ptr<CategoryNamePartSet> result(std::make_shared<CategoryNamePartSet>());
- std::shared_ptr<const CategoryNamePartSet> cats(category_names());
+ std::shared_ptr<const CategoryNamePartSet> cats(category_names({ }));
for (CategoryNamePartSet::ConstIterator c(cats->begin()), c_end(cats->end()) ;
c != c_end ; ++c)
- if (has_package_named(*c + p))
+ if (has_package_named(*c + p, { }))
result->insert(*c);
return result;
@@ -210,7 +212,7 @@ Repository::can_be_favourite_repository() const
}
std::shared_ptr<const CategoryNamePartSet>
-Repository::unimportant_category_names() const
+Repository::unimportant_category_names(const RepositoryContentMayExcludes &) const
{
return std::make_shared<CategoryNamePartSet>();
}
diff --git a/paludis/repository.hh b/paludis/repository.hh
index f99e1cafd..eba8c1e88 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -353,23 +353,29 @@ namespace paludis
/**
* Do we have a category with the given name?
+ *
+ * \since 0.59 takes repository_content_may_excludes
*/
- virtual bool has_category_named(const CategoryNamePart & c) const = 0;
+ virtual bool has_category_named(const CategoryNamePart & c,
+ const RepositoryContentMayExcludes & repository_content_may_excludes) const = 0;
/**
* Do we have a package in the given category with the given name?
*/
- virtual bool has_package_named(const QualifiedPackageName & q) const = 0;
+ virtual bool has_package_named(const QualifiedPackageName & q,
+ const RepositoryContentMayExcludes & repository_content_may_excludes) const = 0;
/**
* Fetch our category names.
*/
- virtual std::shared_ptr<const CategoryNamePartSet> category_names() const = 0;
+ virtual std::shared_ptr<const CategoryNamePartSet> category_names(
+ const RepositoryContentMayExcludes & repository_content_may_excludes) const = 0;
/**
* Fetch unimportant categories.
*/
- virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names() const;
+ virtual std::shared_ptr<const CategoryNamePartSet> unimportant_category_names(
+ const RepositoryContentMayExcludes & repository_content_may_excludes) const;
/**
* Are we unimportant?
@@ -384,18 +390,21 @@ namespace paludis
* Fetch categories that contain a named package.
*/
virtual std::shared_ptr<const CategoryNamePartSet> category_names_containing_package(
- const PackageNamePart & p) const;
+ const PackageNamePart & p,
+ const RepositoryContentMayExcludes & repository_content_may_excludes) const;
/**
* Fetch our package names.
*/
virtual std::shared_ptr<const QualifiedPackageNameSet> package_names(
- const CategoryNamePart & c) const = 0;
+ const CategoryNamePart & c,
+ const RepositoryContentMayExcludes & repository_content_may_excludes) const = 0;
/**
* Fetch our IDs.
*/
- virtual std::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p) const = 0;
+ virtual std::shared_ptr<const PackageIDSequence> package_ids(const QualifiedPackageName & p,
+ const RepositoryContentMayExcludes & repository_content_may_excludes) const = 0;
/**
* Might some of our IDs support a particular action?
diff --git a/paludis/repository.se b/paludis/repository.se
new file mode 100644
index 000000000..22f96ca14
--- /dev/null
+++ b/paludis/repository.se
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et ft=sh :
+
+make_enum_RepositoryContentMayExclude()
+{
+ prefix rcme
+
+ key rcme_masked "The result may exclude masked entries"
+
+ doxygen_comment << "END"
+ /**
+ * Allow Repository to produce a partial set of results to certain
+ * queries, if doing so would save time.
+ *
+ * \see Repository
+ * \ingroup g_repository
+ * \since 0.59
+ */
+END
+}
+
diff --git a/paludis/repository_name_cache.cc b/paludis/repository_name_cache.cc
index f106df019..26ae537eb 100644
--- a/paludis/repository_name_cache.cc
+++ b/paludis/repository_name_cache.cc
@@ -235,11 +235,11 @@ RepositoryNameCache::regenerate_cache() const
std::unordered_map<std::string, std::string, Hash<std::string> > m;
- std::shared_ptr<const CategoryNamePartSet> cats(_imp->repo->category_names());
+ std::shared_ptr<const CategoryNamePartSet> cats(_imp->repo->category_names({ }));
for (CategoryNamePartSet::ConstIterator c(cats->begin()), c_end(cats->end()) ;
c != c_end ; ++c)
{
- std::shared_ptr<const QualifiedPackageNameSet> pkgs(_imp->repo->package_names(*c));
+ std::shared_ptr<const QualifiedPackageNameSet> pkgs(_imp->repo->package_names(*c, { }));
for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()), p_end(pkgs->end()) ;
p != p_end ; ++p)
m[stringify(p->package())].append(stringify(*c) + "\n");