aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-11 21:41:46 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-11 22:35:27 +0100
commite27dabb7c338116b1f496d09d51c6869e298e043 (patch)
tree8b59461d5c48861bf457964b62e14c1e6836c7b7
parent213d61ac7e59b497355d13ab758b2dccd9d57792 (diff)
downloadpaludis-e27dabb7c338116b1f496d09d51c6869e298e043.tar.gz
paludis-e27dabb7c338116b1f496d09d51c6869e298e043.tar.xz
Remove ProvidesInterface
-rw-r--r--paludis/repositories/accounts/accounts_repository.cc2
-rw-r--r--paludis/repositories/e/e_repository.cc1
-rw-r--r--paludis/repositories/e/e_repository_TEST_0.cc13
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_0_setup.sh20
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_exheres_0_setup.sh21
-rw-r--r--paludis/repositories/e/exndbam_repository.cc1
-rw-r--r--paludis/repositories/e/vdb_repository.cc43
-rw-r--r--paludis/repositories/e/vdb_repository.hh6
-rw-r--r--paludis/repositories/e/vdb_repository_TEST_cache.cc226
-rwxr-xr-xpaludis/repositories/e/vdb_repository_TEST_cache_setup.sh66
-rw-r--r--paludis/repositories/fake/fake_installed_repository.cc36
-rw-r--r--paludis/repositories/fake/fake_installed_repository.hh8
-rw-r--r--paludis/repositories/fake/fake_repository.cc1
-rw-r--r--paludis/repositories/gemcutter/gemcutter_repository.cc1
-rw-r--r--paludis/repositories/repository/repository_repository.cc1
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.cc1
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc1
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.cc1
-rw-r--r--paludis/repositories/unwritten/unwritten_repository.cc1
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc26
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc15
-rw-r--r--paludis/repository-fwd.hh1
-rw-r--r--paludis/repository.cc8
-rw-r--r--paludis/repository.hh45
-rw-r--r--python/repository.cc21
-rwxr-xr-xpython/repository_TEST.py4
-rw-r--r--ruby/repository.cc2
-rw-r--r--ruby/repository_TEST.rb5
28 files changed, 5 insertions, 572 deletions
diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc
index e86de37..7742e6c 100644
--- a/paludis/repositories/accounts/accounts_repository.cc
+++ b/paludis/repositories/accounts/accounts_repository.cc
@@ -113,7 +113,6 @@ AccountsRepository::AccountsRepository(const AccountsRepositoryParams & p) :
n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0),
n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0),
n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
)),
_imp(p.name(), p)
@@ -130,7 +129,6 @@ AccountsRepository::AccountsRepository(const InstalledAccountsRepositoryParams &
n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0),
n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0),
n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
)),
_imp(p.name(), p)
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 1ce7ca8..04a93d9 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -522,7 +522,6 @@ ERepository::ERepository(const ERepositoryParams & p) :
n::environment_variable_interface() = this,
n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
n::manifest_interface() = this,
- n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0),
n::virtuals_interface() = (*DistributionData::get_instance()->distribution_from_string(p.environment()->distribution())).support_old_style_virtuals() ? this : 0
)),
_imp(this, p)
diff --git a/paludis/repositories/e/e_repository_TEST_0.cc b/paludis/repositories/e/e_repository_TEST_0.cc
index 7f20dcc..2cf19ff 100644
--- a/paludis/repositories/e/e_repository_TEST_0.cc
+++ b/paludis/repositories/e/e_repository_TEST_0.cc
@@ -120,8 +120,8 @@ TEST(ERepository, InstallEAPI0)
n::suitable_destination() = true,
n::supports_uninstall() = true
)));
- installed_repo->add_version("cat", "pretend-installed", "0")->provide_key()->set_from_string("virtual/virtual-pretend-installed");
- installed_repo->add_version("cat", "pretend-installed", "1")->provide_key()->set_from_string("virtual/virtual-pretend-installed");
+ installed_repo->add_version("cat", "pretend-installed", "0");
+ installed_repo->add_version("cat", "pretend-installed", "1");
env.add_repository(2, installed_repo);
#ifdef ENABLE_VIRTUALS_REPOSITORY
@@ -144,15 +144,6 @@ TEST(ERepository, InstallEAPI0)
n::want_phase() = &want_all_phases
));
-#ifdef ENABLE_VIRTUALS_REPOSITORY
- {
- const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
- PackageDepSpec(parse_user_package_dep_spec("=virtual/virtual-pretend-installed-0",
- &env, { })), make_null_shared_ptr(), { }))]->last());
- ASSERT_TRUE(bool(id));
- }
-#endif
-
{
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/in-ebuild-die",
diff --git a/paludis/repositories/e/e_repository_TEST_0_setup.sh b/paludis/repositories/e/e_repository_TEST_0_setup.sh
index 0fd252f..a133463 100755
--- a/paludis/repositories/e/e_repository_TEST_0_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_0_setup.sh
@@ -27,10 +27,6 @@ mkdir -p repo/{profiles/profile,metadata,eclass} || exit 1
cd repo || exit 1
echo "test-repo" >> profiles/repo_name || exit 1
echo "cat" >> profiles/categories || exit 1
-cat <<END > profiles/profile/virtuals
-virtual/virtual-pretend-installed cat/pretend-installed
-virtual/virtual-doesnotexist cat/doesnotexist
-END
cat <<END > profiles/profile/make.defaults
ARCH="cheese"
USERLAND="GNU"
@@ -416,22 +412,6 @@ pkg_setup() {
BV2=$(best_version cat/doesnotexist )
[[ "$BV2" == "" ]] || die "BV2 is $BV2"
-
- if [[ -n "$PALUDIS_ENABLE_VIRTUALS_REPOSITORY" ]] ; then
- if ! best_version virtual/virtual-pretend-installed >/dev/null ; then
- die "failed virtual/virtual-pretend-installed"
- fi
-
- BV3=$(best_version virtual/virtual-pretend-installed )
- [[ "$BV3" == "cat/pretend-installed-1" ]] || die "BV3 is $BV3"
-
- if best_version virtual/virtual-doesnotexist >/dev/null ; then
- die "not failed virtual/virtual-doesnotexist"
- fi
-
- BV2=$(best_version virtual/virtual-doesnotexist )
- [[ "$BV4" == "" ]] || die "BV4 is $BV4"
- fi
}
END
mkdir -p "cat/has-version"
diff --git a/paludis/repositories/e/e_repository_TEST_exheres_0_setup.sh b/paludis/repositories/e/e_repository_TEST_exheres_0_setup.sh
index baf2569..03d93ae 100755
--- a/paludis/repositories/e/e_repository_TEST_exheres_0_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_exheres_0_setup.sh
@@ -26,10 +26,6 @@ END
mkdir -p repo/{profiles/profile,metadata,eclass} || exit 1
cd repo || exit 1
echo "test-repo" >> profiles/repo_name || exit 1
-cat <<END > profiles/profile/virtuals
-virtual/virtual-pretend-installed cat/pretend-installed
-virtual/virtual-doesnotexist cat/doesnotexist
-END
echo "cat" >> metadata/categories.conf || exit 1
cat <<END > profiles/profile/make.defaults
CHOST="i286-badger-linux-gnu"
@@ -812,23 +808,6 @@ pkg_setup() {
BV2=$(best_version cat/doesnotexist )
[[ "$BV2" == "" ]] || die "BV2 is $BV2"
-
- if [[ -n "$PALUDIS_ENABLE_VIRTUALS_REPOSITORY" ]] ; then
- if ! best_version virtual/virtual-pretend-installed >/dev/null ; then
- die "failed virtual/virtual-pretend-installed"
- fi
-
- BV3=$(best_version virtual/virtual-pretend-installed )
- [[ "$BV3" == "virtual/virtual-pretend-installed-1::installed-virtuals (virtual for cat/pretend-installed-1:0::installed)" ]] \
- || die "BV3 is $BV3"
-
- if best_version virtual/virtual-doesnotexist >/dev/null ; then
- die "not failed virtual/virtual-doesnotexist"
- fi
-
- BV2=$(best_version virtual/virtual-doesnotexist )
- [[ "$BV4" == "" ]] || die "BV4 is $BV4"
- fi
}
END
mkdir -p "packages/cat/has-version"
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 87b0955..5c6c4f4 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -111,7 +111,6 @@ ExndbamRepository::ExndbamRepository(const RepositoryName & n, const ExndbamRepo
n::environment_variable_interface() = this,
n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0),
n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
)),
_imp(p)
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 1f0bb73..1bc15b5 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -114,7 +114,6 @@ namespace paludis
mutable bool has_category_names;
mutable IDMap ids;
- mutable std::shared_ptr<RepositoryProvidesInterface::ProvidesSequence> provides;
mutable std::shared_ptr<ProvidesMap> provides_map;
mutable bool tried_provides_cache, used_provides_cache;
std::shared_ptr<RepositoryNameCache> names_cache;
@@ -174,7 +173,6 @@ VDBRepository::VDBRepository(const VDBRepositoryParams & p) :
n::environment_variable_interface() = this,
n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::provides_interface() = this,
n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
)),
_imp(this, p)
@@ -565,7 +563,6 @@ VDBRepository::perform_uninstall(
{
_imp->provides_map->erase(std::make_pair(id->name(), id->version()));
write_provides_cache();
- _imp->provides.reset();
}
}
@@ -577,45 +574,6 @@ VDBRepository::invalidate()
_add_metadata_keys();
}
-std::shared_ptr<const RepositoryProvidesInterface::ProvidesSequence>
-VDBRepository::provided_packages() const
-{
- Lock l(*_imp->big_nasty_mutex);
-
- if (_imp->provides)
- return _imp->provides;
-
- Context context("When finding provided packages for '" + stringify(name()) + "':");
-
- if (! _imp->provides_map)
- {
- if (! load_provided_using_cache())
- load_provided_the_slow_way();
- }
-
- _imp->provides = std::make_shared<RepositoryProvidesInterface::ProvidesSequence>();
- for (ProvidesMap::const_iterator it(_imp->provides_map->begin()),
- it_end(_imp->provides_map->end()); it_end != it; ++it)
- {
- std::shared_ptr<const ERepositoryID> id(package_id_if_exists(it->first.first, it->first.second));
- if (! id)
- {
- Log::get_instance()->message("e.vdb.provides.no_package", ll_warning, lc_context) <<
- "No package available for '" << it->first.first << " " << it->first.second << "'";
- continue;
- }
-
- for (std::list<QualifiedPackageName>::const_iterator it2(it->second->begin()),
- it2_end(it->second->end()); it2_end != it2; ++it2)
- _imp->provides->push_back(make_named_values<RepositoryProvidesEntry>(
- n::provided_by() = id,
- n::virtual_name() = *it2
- ));
- }
-
- return _imp->provides;
-}
-
bool
VDBRepository::load_provided_using_cache() const
{
@@ -1056,7 +1014,6 @@ VDBRepository::merge(const MergeParams & m)
{
provides_from_package_id(m.package_id());
write_provides_cache();
- _imp->provides.reset();
}
}
diff --git a/paludis/repositories/e/vdb_repository.hh b/paludis/repositories/e/vdb_repository.hh
index a57876a..4438f12 100644
--- a/paludis/repositories/e/vdb_repository.hh
+++ b/paludis/repositories/e/vdb_repository.hh
@@ -74,7 +74,6 @@ namespace paludis
*/
class PALUDIS_VISIBLE VDBRepository :
public erepository::EInstalledRepository,
- public RepositoryProvidesInterface,
public std::enable_shared_from_this<VDBRepository>
{
private:
@@ -122,11 +121,6 @@ namespace paludis
const std::shared_ptr<const erepository::ERepositoryID> & id,
const UninstallAction &) const;
- /* RepositoryProvidesInterface */
-
- virtual std::shared_ptr<const ProvidesSequence> provided_packages() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
/* RepositoryDestinationInterface */
virtual void merge(const MergeParams &);
diff --git a/paludis/repositories/e/vdb_repository_TEST_cache.cc b/paludis/repositories/e/vdb_repository_TEST_cache.cc
index 07d091f..9e630b7 100644
--- a/paludis/repositories/e/vdb_repository_TEST_cache.cc
+++ b/paludis/repositories/e/vdb_repository_TEST_cache.cc
@@ -333,229 +333,3 @@ TEST(NamesCache, Incremental)
}
}
-TEST(ProvidesCache, Works)
-{
- FSPath provides_cache(stringify(FSPath::cwd() / "vdb_repository_TEST_cache_dir" / "providestest/.cache/provides"));
-
- TestEnvironment env;
- std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
- keys = std::make_shared<Map<std::string, std::string>>();
- keys->insert("format", "vdb");
- keys->insert("names_cache", "/var/empty");
- keys->insert("provides_cache", stringify(provides_cache));
- keys->insert("location", stringify(FSPath::cwd() / "vdb_repository_TEST_cache_dir" / "providestest"));
- keys->insert("builddir", stringify(FSPath::cwd() / "vdb_repository_TEST_cache_dir" / "build"));
- keys->insert("root", stringify(FSPath("vdb_repository_TEST_cache_dir/root").realpath()));
- std::shared_ptr<Repository> vdb_repo(VDBRepository::VDBRepository::repository_factory_create(&env,
- std::bind(from_keys, keys, std::placeholders::_1)));
- env.add_repository(0, vdb_repo);
-
- ASSERT_TRUE(! provides_cache.stat().exists());
-
- {
- std::shared_ptr<const RepositoryProvidesInterface::ProvidesSequence> seq(vdb_repo->provides_interface()->provided_packages());
-
- for (RepositoryProvidesInterface::ProvidesSequence::ConstIterator s(seq->begin()), s_end(seq->end()) ;
- s != s_end ; ++s)
-
- EXPECT_EQ(5, std::distance(seq->begin(), seq->end()));
-
- RepositoryProvidesInterface::ProvidesSequence::ConstIterator it(seq->begin());
- EXPECT_EQ("virtual/foo", stringify(it->virtual_name()));
- EXPECT_EQ("cat1/pkg1-1:1::installed", stringify(*(*it++).provided_by()));
- EXPECT_EQ("virtual/foo", stringify(it->virtual_name()));
- EXPECT_EQ("cat1/pkg1-2:2::installed", stringify(*(*it++).provided_by()));
- EXPECT_EQ("virtual/foo", stringify(it->virtual_name()));
- EXPECT_EQ("cat1/pkg2-1:1::installed", stringify(*(*it++).provided_by()));
- EXPECT_EQ("virtual/bar", stringify(it->virtual_name()));
- EXPECT_EQ("cat1/pkg2-1:1::installed", stringify(*(*it++).provided_by()));
- EXPECT_EQ("virtual/bar", stringify(it->virtual_name()));
- EXPECT_EQ("cat1/pkg2-2:2::installed", stringify(*(*it++).provided_by()));
- }
-
- vdb_repo->regenerate_cache();
- EXPECT_EQ("paludis-3\ninstalled\ncat1/pkg1 1 virtual/foo\ncat1/pkg1 2 virtual/foo\ncat1/pkg2 1 virtual/foo virtual/bar\ncat1/pkg2 2 virtual/bar\n", read_file(provides_cache));
- vdb_repo->invalidate();
-
- {
- std::shared_ptr<const RepositoryProvidesInterface::ProvidesSequence> seq(vdb_repo->provides_interface()->provided_packages());
- EXPECT_EQ(5, std::distance(seq->begin(), seq->end()));
-
- for (auto i(seq->begin()), i_end(seq->end()) ;
- i != i_end ; ++i)
- ASSERT_TRUE(! stringify(i->provided_by()->slot_key()->parse_value()).empty());
-
- RepositoryProvidesInterface::ProvidesSequence::ConstIterator it(seq->begin());
- EXPECT_EQ("virtual/foo", stringify(it->virtual_name()));
- EXPECT_EQ("cat1/pkg1-1:1::installed", stringify(*(*it++).provided_by()));
- EXPECT_EQ("virtual/foo", stringify(it->virtual_name()));
- EXPECT_EQ("cat1/pkg1-2:2::installed", stringify(*(*it++).provided_by()));
- EXPECT_EQ("virtual/foo", stringify(it->virtual_name()));
- EXPECT_EQ("cat1/pkg2-1:1::installed", stringify(*(*it++).provided_by()));
- EXPECT_EQ("virtual/bar", stringify(it->virtual_name()));
- EXPECT_EQ("cat1/pkg2-1:1::installed", stringify(*(*it++).provided_by()));
- EXPECT_EQ("virtual/bar", stringify(it->virtual_name()));
- EXPECT_EQ("cat1/pkg2-2:2::installed", stringify(*(*it++).provided_by()));
- }
-}
-
-TEST(ProvidesCache, Incremental)
-{
- FSPath provides_cache(stringify(FSPath::cwd() / "vdb_repository_TEST_cache_dir" / "providesincrtest/.cache/provides"));
-
- TestEnvironment env;
- std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
- keys->insert("format", "e");
- keys->insert("names_cache", "/var/empty");
- keys->insert("location", stringify(FSPath::cwd() / "vdb_repository_TEST_cache_dir" / "providesincrtest_src1"));
- keys->insert("profiles", stringify(FSPath::cwd() / "vdb_repository_TEST_cache_dir" / "providesincrtest_src1/profiles/profile"));
- keys->insert("layout", "traditional");
- keys->insert("eapi_when_unknown", "0");
- keys->insert("eapi_when_unspecified", "0");
- keys->insert("profile_eapi", "0");
- keys->insert("distdir", stringify(FSPath::cwd() / "vdb_repository_TEST_cache_dir" / "distdir"));
- keys->insert("builddir", stringify(FSPath::cwd() / "vdb_repository_TEST_cache_dir" / "build"));
- keys->insert("root", stringify(FSPath("vdb_repository_TEST_cache_dir/root").realpath()));
- std::shared_ptr<Repository> repo1(ERepository::repository_factory_create(&env,
- std::bind(from_keys, keys, std::placeholders::_1)));
- env.add_repository(1, repo1);
-
- keys = std::make_shared<Map<std::string, std::string>>();
- keys->insert("format", "e");
- keys->insert("names_cache", "/var/empty");
- keys->insert("location", stringify(FSPath::cwd() / "vdb_repository_TEST_cache_dir" / "providesincrtest_src2"));
- keys->insert("profiles", stringify(FSPath::cwd() / "vdb_repository_TEST_cache_dir" / "providesincrtest_src1/profiles/profile"));
- keys->insert("layout", "traditional");
- keys->insert("eapi_when_unknown", "0");
- keys->insert("eapi_when_unspecified", "0");
- keys->insert("profile_eapi", "0");
- keys->insert("distdir", stringify(FSPath::cwd() / "vdb_repository_TEST_cache_dir" / "distdir"));
- keys->insert("builddir", stringify(FSPath::cwd() / "vdb_repository_TEST_cache_dir" / "build"));
- keys->insert("root", stringify(FSPath("vdb_repository_TEST_cache_dir/root").realpath()));
- std::shared_ptr<Repository> repo2(ERepository::repository_factory_create(&env,
- std::bind(from_keys, keys, std::placeholders::_1)));
- env.add_repository(2, repo2);
-
- keys = std::make_shared<Map<std::string, std::string>>();
- keys->insert("format", "vdb");
- keys->insert("names_cache", "/var/empty");
- keys->insert("provides_cache", stringify(provides_cache));
- keys->insert("location", stringify(FSPath::cwd() / "vdb_repository_TEST_cache_dir" / "providesincrtest"));
- keys->insert("builddir", stringify(FSPath::cwd() / "vdb_repository_TEST_cache_dir" / "build"));
- keys->insert("root", stringify(FSPath("vdb_repository_TEST_cache_dir/root").realpath()));
- std::shared_ptr<Repository> vdb_repo(VDBRepository::VDBRepository::repository_factory_create(&env,
- std::bind(from_keys, keys, std::placeholders::_1)));
- env.add_repository(0, vdb_repo);
-
- UninstallAction uninstall_action(make_named_values<UninstallActionOptions>(
- n::config_protect() = "",
- n::if_for_install_id() = make_null_shared_ptr(),
- n::ignore_for_unmerge() = &ignore_nothing,
- n::is_overwrite() = false,
- n::make_output_manager() = &make_standard_output_manager,
- n::override_contents() = make_null_shared_ptr()
- ));
-
- EXPECT_EQ("paludis-3\ninstalled\n", read_file(provides_cache));
-
- {
- install(env, vdb_repo, "=cat1/pkg1-1::providesincrtest_src1", "");
- vdb_repo->invalidate();
-
- EXPECT_EQ("paludis-3\ninstalled\ncat1/pkg1 1 virtual/foo\n", read_file(provides_cache));
- }
-
- {
- install(env, vdb_repo, "=cat1/pkg1-1::providesincrtest_src1", "");
- vdb_repo->invalidate();
-
- EXPECT_EQ("paludis-3\ninstalled\ncat1/pkg1 1 virtual/foo\n", read_file(provides_cache));
- }
-
- {
- install(env, vdb_repo, "=cat1/pkg1-1.1::providesincrtest_src1", "=cat1/pkg1-1::installed");
- vdb_repo->invalidate();
-
- EXPECT_EQ("paludis-3\ninstalled\ncat1/pkg1 1.1 virtual/foo\n", read_file(provides_cache));
- }
-
- {
- install(env, vdb_repo, "=cat1/pkg1-1.1::providesincrtest_src2", "");
- vdb_repo->invalidate();
-
- EXPECT_EQ("paludis-3\ninstalled\ncat1/pkg1 1.1-r0 virtual/foo\n", read_file(provides_cache));
- }
-
- {
- install(env, vdb_repo, "=cat1/pkg1-1::providesincrtest_src1", "=cat1/pkg1-1.1::installed");
- vdb_repo->invalidate();
-
- EXPECT_EQ("paludis-3\ninstalled\ncat1/pkg1 1 virtual/foo\n", read_file(provides_cache));
- }
-
- {
- install(env, vdb_repo, "=cat1/pkg1-1::providesincrtest_src2", "");
- vdb_repo->invalidate();
-
- EXPECT_EQ("paludis-3\ninstalled\ncat1/pkg1 1 virtual/bar\n", read_file(provides_cache));
- }
-
- {
- install(env, vdb_repo, "=cat1/pkg1-2::providesincrtest_src1", "");
- vdb_repo->invalidate();
-
- EXPECT_EQ("paludis-3\ninstalled\ncat1/pkg1 1 virtual/bar\ncat1/pkg1 2 virtual/foo\n", read_file(provides_cache));
- }
-
- {
- const std::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
- PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-2::installed",
- &env, { })), make_null_shared_ptr(), { }))]->begin());
- inst_id->perform_action(uninstall_action);
- vdb_repo->invalidate();
-
- EXPECT_EQ("paludis-3\ninstalled\ncat1/pkg1 1 virtual/bar\n", read_file(provides_cache));
- }
-
- {
- install(env, vdb_repo, "=cat1/pkg2-1::providesincrtest_src1", "");
- vdb_repo->invalidate();
-
- EXPECT_EQ("paludis-3\ninstalled\ncat1/pkg1 1 virtual/bar\ncat1/pkg2 1 virtual/foo\n", read_file(provides_cache));
- }
-
- {
- const std::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
- PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg2-1::installed",
- &env, { })), make_null_shared_ptr(), { }))]->begin());
- inst_id->perform_action(uninstall_action);
- vdb_repo->invalidate();
-
- EXPECT_EQ("paludis-3\ninstalled\ncat1/pkg1 1 virtual/bar\n", read_file(provides_cache));
- }
-
- {
- const std::shared_ptr<const PackageID> inst_id(*env[selection::RequireExactlyOne(generator::Matches(
- PackageDepSpec(parse_user_package_dep_spec("=cat1/pkg1-1::installed",
- &env, { })), make_null_shared_ptr(), { }))]->begin());
- inst_id->perform_action(uninstall_action);
- vdb_repo->invalidate();
-
- EXPECT_EQ("paludis-3\ninstalled\n", read_file(provides_cache));
- }
-
- {
- install(env, vdb_repo, "=cat2/pkg1-1::providesincrtest_src1", "");
- vdb_repo->invalidate();
-
- EXPECT_EQ("paludis-3\ninstalled\ncat2/pkg1 1 virtual/moo\n", read_file(provides_cache));
- }
-
- {
- install(env, vdb_repo, "=cat2/pkg1-2::providesincrtest_src1", "=cat2/pkg1-1::installed");
- vdb_repo->invalidate();
-
- EXPECT_EQ("paludis-3\ninstalled\ncat2/pkg1 2 virtual/moo\n", read_file(provides_cache));
- }
-}
-
diff --git a/paludis/repositories/e/vdb_repository_TEST_cache_setup.sh b/paludis/repositories/e/vdb_repository_TEST_cache_setup.sh
index 241a689..fd756fe 100755
--- a/paludis/repositories/e/vdb_repository_TEST_cache_setup.sh
+++ b/paludis/repositories/e/vdb_repository_TEST_cache_setup.sh
@@ -39,69 +39,3 @@ SLOT="0"
END
cp namesincrtest_src/cat3/pkg1/pkg1-{1,2}.ebuild
-mkdir -p providestest/{.cache,cat1/{pkg1,pkg2,pkg3}-{1,2}} || exit 1
-for f in providestest/cat1/{pkg1,pkg2,pkg3}-{1,2}/EAPI; do
- echo 0 >${f}
-done
-for f in providestest/cat1/{pkg1,pkg2,pkg3}-1/SLOT; do
- echo 1 >${f}
-done
-for f in providestest/cat1/{pkg1,pkg2,pkg3}-2/SLOT; do
- echo 2 >${f}
-done
-for f in providestest/cat1/{pkg1,pkg2,pkg3}-{1,2}/USE; do
- echo enabled >${f}
-done
-for f in providestest/cat1/{pkg1,pkg2,pkg3}-{1,2}/IUSE; do
- echo disabled enabled >${f}
-done
-
-echo ' virtual/foo' >providestest/cat1/pkg1-1/PROVIDE
-echo 'enabled? ( virtual/foo )' >providestest/cat1/pkg1-2/PROVIDE
-echo 'enabled? ( virtual/foo ) virtual/bar' >providestest/cat1/pkg2-1/PROVIDE
-echo 'disabled? ( virtual/foo ) virtual/bar' >providestest/cat1/pkg2-2/PROVIDE
-echo 'disabled? ( virtual/foo )' >providestest/cat1/pkg3-1/PROVIDE
-echo '' >providestest/cat1/pkg3-2/PROVIDE
-
-mkdir -p providesincrtest/.cache providesincrtest_src{1,2}/{eclass,profiles/profile,{cat1,cat2}/{pkg1,pkg2}} || exit 1
-echo paludis-3 >providesincrtest/.cache/provides
-echo installed >>providesincrtest/.cache/provides
-
-cat <<END > providesincrtest_src1/profiles/profile/make.defaults
-ARCH=test
-USERLAND="GNU"
-KERNEL="linux"
-CHOST="i286-badger-linux-gnu"
-END
-echo providesincrtest_src1 >providesincrtest_src1/profiles/repo_name
-echo providesincrtest_src2 >providesincrtest_src2/profiles/repo_name
-echo cat1 >providesincrtest_src1/profiles/categories
-echo cat2 >>providesincrtest_src1/profiles/categories
-echo cat1 >providesincrtest_src2/profiles/categories
-
-cat <<END >providesincrtest_src1/cat1/pkg1/pkg1-1.ebuild
-KEYWORDS="test"
-SLOT="\${PV:0:1}"
-PROVIDE="enabled? ( virtual/foo ) disabled? ( virtual/bar )"
-IUSE="enabled disabled"
-END
-cp providesincrtest_src1/cat1/pkg1/pkg1-{1,1.1}.ebuild
-cp providesincrtest_src1/cat1/pkg1/pkg1-{1,2}.ebuild
-cp providesincrtest_src1/cat1/{pkg1/pkg1,pkg2/pkg2}-1.ebuild
-cp providesincrtest_src1/cat1/pkg1/pkg1-1.1.ebuild providesincrtest_src2/cat1/pkg1/pkg1-1.1-r0.ebuild
-
-cat <<END >providesincrtest_src2/cat1/pkg1/pkg1-1.ebuild
-KEYWORDS="test"
-SLOT="\${PV:0:1}"
-PROVIDE="enabled? ( virtual/bar ) disabled? ( virtual/foo )"
-IUSE="enabled disabled"
-END
-
-cat <<END >providesincrtest_src1/cat2/pkg1/pkg1-1.ebuild
-EAPI=paludis-1
-KEYWORDS="test"
-SLOT="0"
-PROVIDE="virtual/moo"
-END
-cp providesincrtest_src1/cat2/pkg1/pkg1-{1,2}.ebuild
-
diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc
index 29bda5d..3bed239 100644
--- a/paludis/repositories/fake/fake_installed_repository.cc
+++ b/paludis/repositories/fake/fake_installed_repository.cc
@@ -63,7 +63,6 @@ FakeInstalledRepository::FakeInstalledRepository(const FakeInstalledRepositoryPa
n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0),
n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::provides_interface() = this,
n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
)),
_imp(p.supports_uninstall(), p.suitable_destination())
@@ -82,41 +81,6 @@ FakeInstalledRepository::is_suitable_destination_for(const std::shared_ptr<const
return _imp->is_suitable_destination;
}
-std::shared_ptr<const FakeInstalledRepository::ProvidesSequence>
-FakeInstalledRepository::provided_packages() const
-{
- std::shared_ptr<ProvidesSequence> result(std::make_shared<ProvidesSequence>());
-
- 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, { }));
- for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()), p_end(pkgs->end()) ;
- p != p_end ; ++p)
- {
- std::shared_ptr<const PackageIDSequence> vers(package_ids(*p, { }));
- for (PackageIDSequence::ConstIterator v(vers->begin()), v_end(vers->end()) ;
- v != v_end ; ++v)
- {
- if (! (*v)->provide_key())
- continue;
-
- DepSpecFlattener<ProvideSpecTree, PackageDepSpec> f(environment(), *v);
- (*v)->provide_key()->parse_value()->top()->accept(f);
-
- for (DepSpecFlattener<ProvideSpecTree, PackageDepSpec>::ConstIterator q(f.begin()), q_end(f.end()) ; q != q_end ; ++q)
- result->push_back(make_named_values<RepositoryProvidesEntry>(
- n::provided_by() = *v,
- n::virtual_name() = QualifiedPackageName((*q)->text())
- ));
- }
- }
- }
-
- return result;
-}
-
bool
FakeInstalledRepository::want_pre_post_phases() const
{
diff --git a/paludis/repositories/fake/fake_installed_repository.hh b/paludis/repositories/fake/fake_installed_repository.hh
index 27a2bf2..b7c0eb8 100644
--- a/paludis/repositories/fake/fake_installed_repository.hh
+++ b/paludis/repositories/fake/fake_installed_repository.hh
@@ -50,8 +50,7 @@ namespace paludis
*/
class PALUDIS_VISIBLE FakeInstalledRepository :
public FakeRepositoryBase,
- public RepositoryDestinationInterface,
- public RepositoryProvidesInterface
+ public RepositoryDestinationInterface
{
private:
Pimp<FakeInstalledRepository> _imp;
@@ -67,11 +66,6 @@ namespace paludis
virtual void merge(const MergeParams &);
- /* RepositoryProvidesInterface */
-
- virtual std::shared_ptr<const ProvidesSequence> provided_packages() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
public:
///\name Basic operations
///\{
diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc
index 60040a0..02cdcd5 100644
--- a/paludis/repositories/fake/fake_repository.cc
+++ b/paludis/repositories/fake/fake_repository.cc
@@ -58,7 +58,6 @@ FakeRepository::FakeRepository(const FakeRepositoryParams & params) :
n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0),
n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0),
n::virtuals_interface() = (*DistributionData::get_instance()->distribution_from_string(
params.environment()->distribution())).support_old_style_virtuals() ? this : 0
)),
diff --git a/paludis/repositories/gemcutter/gemcutter_repository.cc b/paludis/repositories/gemcutter/gemcutter_repository.cc
index 1cdeecb..faab0cb 100644
--- a/paludis/repositories/gemcutter/gemcutter_repository.cc
+++ b/paludis/repositories/gemcutter/gemcutter_repository.cc
@@ -88,7 +88,6 @@ GemcutterRepository::GemcutterRepository(const GemcutterRepositoryParams & p) :
n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0),
n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0),
n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
)),
_imp(this, p)
diff --git a/paludis/repositories/repository/repository_repository.cc b/paludis/repositories/repository/repository_repository.cc
index eb25a73..957341b 100644
--- a/paludis/repositories/repository/repository_repository.cc
+++ b/paludis/repositories/repository/repository_repository.cc
@@ -97,7 +97,6 @@ RepositoryRepository::RepositoryRepository(const RepositoryRepositoryParams & p)
n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0),
n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0),
n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
)),
_imp(this, p)
diff --git a/paludis/repositories/unavailable/unavailable_repository.cc b/paludis/repositories/unavailable/unavailable_repository.cc
index a5e554b..fca38ad 100644
--- a/paludis/repositories/unavailable/unavailable_repository.cc
+++ b/paludis/repositories/unavailable/unavailable_repository.cc
@@ -106,7 +106,6 @@ UnavailableRepository::UnavailableRepository(const UnavailableRepositoryParams &
n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0),
n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0),
n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
)),
_imp(this, p)
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index 08d9e49..159c38b 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -95,7 +95,6 @@ InstalledUnpackagedRepository::InstalledUnpackagedRepository(
n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0),
n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0),
n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
)),
_imp(p)
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc
index dc78884..49e17fe 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository.cc
@@ -99,7 +99,6 @@ UnpackagedRepository::UnpackagedRepository(const RepositoryName & n,
n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0),
n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0),
n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
)),
_imp(n, params)
diff --git a/paludis/repositories/unwritten/unwritten_repository.cc b/paludis/repositories/unwritten/unwritten_repository.cc
index 7aa9bc4..fbf1929 100644
--- a/paludis/repositories/unwritten/unwritten_repository.cc
+++ b/paludis/repositories/unwritten/unwritten_repository.cc
@@ -100,7 +100,6 @@ UnwrittenRepository::UnwrittenRepository(const UnwrittenRepositoryParams & p) :
n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0),
n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0),
n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
)),
_imp(this, p)
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index 24f6955..1a41407 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -114,7 +114,6 @@ InstalledVirtualsRepository::InstalledVirtualsRepository(const Environment * con
n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0),
n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0),
n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
)),
_imp(env, r)
@@ -135,31 +134,6 @@ InstalledVirtualsRepository::need_ids() const
if (_imp->has_ids)
return;
- /* Populate our _imp->entries. We need to iterate over each repository in
- * our env's package database, see if it has a provides interface, and if it
- * does create an entry for each provided package. */
- for (auto r(_imp->env->begin_repositories()),
- r_end(_imp->env->end_repositories()) ; r != r_end ; ++r)
- {
- if (! (**r).provides_interface())
- continue;
-
- std::shared_ptr<const RepositoryProvidesInterface::ProvidesSequence> pp(
- (**r).provides_interface()->provided_packages());
-
- for (RepositoryProvidesInterface::ProvidesSequence::ConstIterator p(
- pp->begin()), p_end(pp->end()) ; p != p_end ; ++p)
- {
- IDMap::iterator i(_imp->ids.find((*p).virtual_name()));
- if (i == _imp->ids.end())
- i = _imp->ids.insert(std::make_pair((*p).virtual_name(), std::make_shared<PackageIDSequence>())).first;
-
- std::shared_ptr<const PackageID> id(std::make_shared<virtuals::VirtualsPackageID>(
- _imp->env, name(), (*p).virtual_name(), (*p).provided_by(), false));
- i->second->push_back(id);
- }
- }
-
_imp->has_ids = true;
}
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 1aa80cc..d3233e7 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -125,7 +125,6 @@ VirtualsRepository::VirtualsRepository(const Environment * const env) :
n::environment_variable_interface() = static_cast<RepositoryEnvironmentVariableInterface *>(0),
n::make_virtuals_interface() = this,
n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::provides_interface() = static_cast<RepositoryProvidesInterface *>(0),
n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
)),
_imp(env)
@@ -149,20 +148,6 @@ VirtualsRepository::need_names() const
Log::get_instance()->message("virtuals.need_names", ll_debug, lc_context) << "VirtualsRepository need_names";
- /* Determine our virtual name -> package mappings. */
- for (auto r(_imp->env->begin_repositories()), r_end(_imp->env->end_repositories()) ; r != r_end ; ++r)
- {
- if (! (**r).provides_interface())
- continue;
-
- std::shared_ptr<const RepositoryProvidesInterface::ProvidesSequence> provides(
- (**r).provides_interface()->provided_packages());
- for (RepositoryProvidesInterface::ProvidesSequence::ConstIterator p(provides->begin()),
- p_end(provides->end()) ; p != p_end ; ++p)
- _imp->names.push_back(std::make_pair((*p).virtual_name(), std::shared_ptr<const PackageDepSpec>(
- std::make_shared<PackageDepSpec>(make_package_dep_spec(PartiallyMadePackageDepSpecOptions()).package((*p).provided_by()->name())))));
- }
-
std::sort(_imp->names.begin(), _imp->names.end(), NamesSortComparator());
_imp->names.erase(std::unique(_imp->names.begin(), _imp->names.end(), NamesUniqueComparator()), _imp->names.end());
diff --git a/paludis/repository-fwd.hh b/paludis/repository-fwd.hh
index 1be58a7..f65a7b6 100644
--- a/paludis/repository-fwd.hh
+++ b/paludis/repository-fwd.hh
@@ -42,7 +42,6 @@ namespace paludis
class Repository;
class RepositoryEnvironmentVariableInterface;
- class RepositoryProvidesInterface;
class RepositoryVirtualsInterface;
class RepositoryMakeVirtualsInterface;
class RepositoryDestinationInterface;
diff --git a/paludis/repository.cc b/paludis/repository.cc
index 567c2ec..67f4251 100644
--- a/paludis/repository.cc
+++ b/paludis/repository.cc
@@ -53,10 +53,6 @@ template class Sequence<RepositoryVirtualsEntry>;
template class WrappedForwardIterator<Sequence<RepositoryVirtualsEntry>::ConstIteratorTag, const RepositoryVirtualsEntry>;
template class WrappedOutputIterator<Sequence<RepositoryVirtualsEntry>::InserterTag, RepositoryVirtualsEntry>;
-template class Sequence<RepositoryProvidesEntry>;
-template class WrappedForwardIterator<Sequence<RepositoryProvidesEntry>::ConstIteratorTag, const RepositoryProvidesEntry>;
-template class WrappedOutputIterator<Sequence<RepositoryProvidesEntry>::InserterTag, RepositoryProvidesEntry>;
-
NoSuchSetError::NoSuchSetError(const std::string & our_name) throw () :
Exception("Could not find '" + our_name + "'"),
_name(our_name)
@@ -185,10 +181,6 @@ RepositoryEnvironmentVariableInterface::~RepositoryEnvironmentVariableInterface(
{
}
-RepositoryProvidesInterface::~RepositoryProvidesInterface()
-{
-}
-
RepositoryVirtualsInterface::~RepositoryVirtualsInterface()
{
}
diff --git a/paludis/repository.hh b/paludis/repository.hh
index 8f173db..abf077b 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -76,7 +76,6 @@ namespace paludis
typedef Name<struct name_profile> profile;
typedef Name<struct name_provided_by> provided_by;
typedef Name<struct name_provided_by_spec> provided_by_spec;
- typedef Name<struct name_provides_interface> provides_interface;
typedef Name<struct name_replacing> replacing;
typedef Name<struct name_status> status;
typedef Name<struct name_used_this_for_config_protect> used_this_for_config_protect;
@@ -97,25 +96,10 @@ namespace paludis
NamedValue<n::environment_variable_interface, RepositoryEnvironmentVariableInterface *> environment_variable_interface;
NamedValue<n::make_virtuals_interface, RepositoryMakeVirtualsInterface *> make_virtuals_interface;
NamedValue<n::manifest_interface, RepositoryManifestInterface *> manifest_interface;
- NamedValue<n::provides_interface, RepositoryProvidesInterface *> provides_interface;
NamedValue<n::virtuals_interface, RepositoryVirtualsInterface *> virtuals_interface;
};
/**
- * A provides entry in a Repository implementing RepositoryProvidesInterface.
- *
- * \see Repository
- * \see RepositoryProvidesInterface
- * \ingroup g_repository
- * \since 0.30
- */
- struct RepositoryProvidesEntry
- {
- NamedValue<n::provided_by, std::shared_ptr<const PackageID> > provided_by;
- NamedValue<n::virtual_name, QualifiedPackageName> virtual_name;
- };
-
- /**
* A virtuals entry in a Repository implementing RepositoryVirtualsInterface.
*
* \see Repository
@@ -560,35 +544,6 @@ namespace paludis
};
/**
- * Interface for repositories that provide packages.
- *
- * \see Repository
- * \ingroup g_repository
- * \nosubgrouping
- */
- class PALUDIS_VISIBLE RepositoryProvidesInterface
- {
- public:
- ///\name Provides functionality
- ///\{
-
- /**
- * A collection of provided packages.
- */
- typedef Sequence<RepositoryProvidesEntry> ProvidesSequence;
-
- /**
- * Fetch our provided packages.
- */
- virtual std::shared_ptr<const ProvidesSequence> provided_packages() const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- ///\}
-
- virtual ~RepositoryProvidesInterface();
- };
-
- /**
* Interface for repositories that can be used as an install destination.
*
* \see Repository
diff --git a/python/repository.cc b/python/repository.cc
index e1cc5e0..25e8821 100644
--- a/python/repository.cc
+++ b/python/repository.cc
@@ -47,12 +47,6 @@ struct RepositoryWrapper :
return self.environment_variable_interface();
}
- static RepositoryProvidesInterface *
- get_provides_interface(const Repository & self)
- {
- return self.provides_interface();
- }
-
static RepositoryVirtualsInterface *
get_virtuals_interface(const Repository & self)
{
@@ -183,11 +177,6 @@ void expose_repository()
"[ro] RepositoryVirtualsInterface"
)
- .add_property("provides_interface", bp::make_function(&RepositoryWrapper::get_provides_interface,
- bp::return_internal_reference<>()),
- "[ro] RepositoryProvidesInterface"
- )
-
.add_property("destination_interface", bp::make_function(&RepositoryWrapper::get_destination_interface,
bp::return_internal_reference<>()),
"[ro] RepositoryDestinationInterface"
@@ -239,16 +228,6 @@ void expose_repository()
);
/**
- * RepositoryProvidesInterface
- */
- bp::class_<RepositoryProvidesInterface, boost::noncopyable>
- (
- "RepositoryProvidesInterface",
- "Interface for repositories that provide packages.",
- bp::no_init
- );
-
- /**
* RepositoryDestinationInterface
*/
bp::class_<RepositoryDestinationInterface, boost::noncopyable>
diff --git a/python/repository_TEST.py b/python/repository_TEST.py
index 3b4519c..101282c 100755
--- a/python/repository_TEST.py
+++ b/python/repository_TEST.py
@@ -110,10 +110,6 @@ class TestCase_02_RepositoryInterfaces(unittest.TestCase):
evi = repo.environment_variable_interface
self.assert_(isinstance(evi, RepositoryEnvironmentVariableInterface))
- def test_08_provides_interface(self):
- pi = irepo.provides_interface
- self.assert_(isinstance(pi, RepositoryProvidesInterface))
-
def test_09_virtuals_interface(self):
vi = repo.virtuals_interface
self.assert_(isinstance(vi, RepositoryVirtualsInterface))
diff --git a/ruby/repository.cc b/ruby/repository.cc
index 62eadfd..537e51c 100644
--- a/ruby/repository.cc
+++ b/ruby/repository.cc
@@ -632,8 +632,6 @@ namespace
rb_define_method(c_repository, "environment_variable_interface", RUBY_FUNC_CAST((&Interface<
n::environment_variable_interface, RepositoryEnvironmentVariableInterface, &Repository::environment_variable_interface>::fetch)), 0);
- rb_define_method(c_repository, "provides_interface", RUBY_FUNC_CAST((&Interface<
- n::provides_interface, RepositoryProvidesInterface, &Repository::provides_interface>::fetch)), 0);
rb_define_method(c_repository, "virtuals_interface", RUBY_FUNC_CAST((&Interface<
n::virtuals_interface, RepositoryVirtualsInterface, &Repository::virtuals_interface>::fetch)), 0);
rb_define_method(c_repository, "some_ids_might_support_action", RUBY_FUNC_CAST(&repository_some_ids_might_support_action), 1);
diff --git a/ruby/repository_TEST.rb b/ruby/repository_TEST.rb
index f11b1f1..8ca9957 100644
--- a/ruby/repository_TEST.rb
+++ b/ruby/repository_TEST.rb
@@ -168,14 +168,13 @@ module Paludis
def test_responds
repo = no_config_testrepo.main_repository
[
- :environment_variable_interface,
- :provides_interface, :virtuals_interface].each do |sym|
+ :environment_variable_interface, :virtuals_interface].each do |sym|
assert_respond_to repo, sym
end
end
def test_interfaces
- assert_equal installed_repo.name, installed_repo.provides_interface.name
+ assert_equal installed_repo.name, installed_repo.environment_variable_interface.name
assert_nil installed_repo.virtuals_interface
end