aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/virtuals
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 /paludis/repositories/virtuals
parent213d61ac7e59b497355d13ab758b2dccd9d57792 (diff)
downloadpaludis-e27dabb7c338116b1f496d09d51c6869e298e043.tar.gz
paludis-e27dabb7c338116b1f496d09d51c6869e298e043.tar.xz
Remove ProvidesInterface
Diffstat (limited to 'paludis/repositories/virtuals')
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc26
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc15
2 files changed, 0 insertions, 41 deletions
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index 24f6955b7..1a4140724 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 1aa80ccf4..d3233e76e 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());