aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e')
-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
11 files changed, 129 insertions, 114 deletions
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");
}