aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e')
-rw-r--r--paludis/repositories/e/e_repository.cc25
-rw-r--r--paludis/repositories/e/e_repository.hh6
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc78
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_setup.sh24
-rw-r--r--paludis/repositories/e/exndbam_repository.cc4
-rw-r--r--paludis/repositories/e/vdb_repository.cc4
6 files changed, 3 insertions, 138 deletions
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 04a93d99c..9fc779e41 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -128,7 +128,6 @@ using namespace paludis;
using namespace paludis::erepository;
typedef std::unordered_map<std::string, std::shared_ptr<MirrorsSequence> > MirrorMap;
-typedef std::unordered_map<QualifiedPackageName, std::shared_ptr<const PackageDepSpec>, Hash<QualifiedPackageName> > VirtualsMap;
typedef std::map<FSPath, std::string, FSPathComparator> EAPIForFileMap;
@@ -520,9 +519,7 @@ ERepository::ERepository(const ERepositoryParams & p) :
make_named_values<RepositoryCapabilities>(
n::destination_interface() = p.binary_destination() ? this : 0,
n::environment_variable_interface() = this,
- n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
- n::manifest_interface() = this,
- n::virtuals_interface() = (*DistributionData::get_instance()->distribution_from_string(p.environment()->distribution())).support_old_style_virtuals() ? this : 0
+ n::manifest_interface() = this
)),
_imp(this, p)
{
@@ -877,26 +874,6 @@ ERepository::environment_updated_profile_variable(const std::string & var) const
return join(values.begin(), last, " ");
}
-std::shared_ptr<const ERepository::VirtualsSequence>
-ERepository::virtual_packages() const
-{
- Context context("When loading virtual packages for repository '" +
- stringify(name()) + "'");
-
- _imp->need_profiles();
-
- std::shared_ptr<VirtualsSequence> result(std::make_shared<VirtualsSequence>());
-
- for (Map<QualifiedPackageName, PackageDepSpec>::ConstIterator i(_imp->profile_ptr->virtuals()->begin()),
- i_end(_imp->profile_ptr->virtuals()->end()) ; i != i_end ; ++i)
- result->push_back(make_named_values<RepositoryVirtualsEntry>(
- n::provided_by_spec() = make_shared_copy(i->second),
- n::virtual_name() = i->first
- ));
-
- return result;
-}
-
void
ERepository::regenerate_cache() const
{
diff --git a/paludis/repositories/e/e_repository.hh b/paludis/repositories/e/e_repository.hh
index 411d52b96..63f4930bd 100644
--- a/paludis/repositories/e/e_repository.hh
+++ b/paludis/repositories/e/e_repository.hh
@@ -51,7 +51,6 @@ namespace paludis
class PALUDIS_VISIBLE ERepository :
public Repository,
public RepositoryEnvironmentVariableInterface,
- public RepositoryVirtualsInterface,
public RepositoryDestinationInterface,
public RepositoryManifestInterface,
public std::enable_shared_from_this<ERepository>
@@ -81,11 +80,6 @@ namespace paludis
virtual void purge_invalid_cache() const;
- /* RepositoryVirtualsInterface */
-
- virtual std::shared_ptr<const VirtualsSequence> virtual_packages() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
/* RepositoryDestinationInterface */
virtual bool is_suitable_destination_for(const std::shared_ptr<const PackageID> &) const
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 24eef92f8..b1c81d50b 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -640,84 +640,6 @@ TEST(ERepository, ProfileMasks)
}
}
-TEST(ERepository, Virtuals)
-{
- 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() / "e_repository_TEST_dir" / "repo15"));
- keys->insert("profiles", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "repo15/profiles/profile"));
- keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "build"));
- std::shared_ptr<ERepository> repo(std::static_pointer_cast<ERepository>(ERepository::repository_factory_create(&env,
- std::bind(from_keys, keys, std::placeholders::_1))));
- env.add_repository(1, repo);
-
- bool has_one(false), has_two(false);
- int count(0);
-
- std::shared_ptr<const RepositoryVirtualsInterface::VirtualsSequence> seq(repo->virtual_packages());
- for (RepositoryVirtualsInterface::VirtualsSequence::ConstIterator it(seq->begin()),
- it_end(seq->end()); it_end != it; ++it, ++count)
- if ("virtual/one" == stringify(it->virtual_name()))
- {
- has_one = true;
- EXPECT_EQ("cat-one/pkg-one", stringify(*it->provided_by_spec()));
- }
- else
- {
- EXPECT_EQ("virtual/two", stringify(it->virtual_name()));
- has_two = true;
- EXPECT_EQ("cat-two/pkg-two", stringify(*it->provided_by_spec()));
- }
-
- EXPECT_TRUE(has_one);
- EXPECT_TRUE(has_two);
- EXPECT_EQ(2, count);
-}
-
-TEST(ERepository, MoreVirtuals)
-{
- 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() / "e_repository_TEST_dir" / "repo15"));
- keys->insert("profiles", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "repo15/profiles/profile/subprofile"));
- keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "build"));
- std::shared_ptr<ERepository> repo(std::static_pointer_cast<ERepository>(ERepository::repository_factory_create(&env,
- std::bind(from_keys, keys, std::placeholders::_1))));
- env.add_repository(1, repo);
-
- bool has_one(false), has_two(false), has_three(false);
- int count(0);
-
- std::shared_ptr<const RepositoryVirtualsInterface::VirtualsSequence> seq(repo->virtual_packages());
- for (RepositoryVirtualsInterface::VirtualsSequence::ConstIterator it(seq->begin()),
- it_end(seq->end()); it_end != it; ++it, ++count)
- if ("virtual/one" == stringify(it->virtual_name()))
- {
- has_one = true;
- EXPECT_EQ("cat-two/pkg-two", stringify(*it->provided_by_spec()));
- }
- else if ("virtual/two" == stringify(it->virtual_name()))
- {
- has_two = true;
- EXPECT_EQ("cat-one/pkg-one", stringify(*it->provided_by_spec()));
- }
- else
- {
- EXPECT_EQ("virtual/three", stringify(it->virtual_name()));
- has_three = true;
- EXPECT_EQ("cat-three/pkg-three", stringify(*it->provided_by_spec()));
- }
-
- EXPECT_TRUE(has_one);
- EXPECT_TRUE(has_two);
- EXPECT_TRUE(has_three);
- EXPECT_EQ(3, count);
-}
-
TEST(ERepository, Manifest)
{
TestEnvironment env;
diff --git a/paludis/repositories/e/e_repository_TEST_setup.sh b/paludis/repositories/e/e_repository_TEST_setup.sh
index 1227fe720..7fb2d822a 100755
--- a/paludis/repositories/e/e_repository_TEST_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_setup.sh
@@ -458,30 +458,6 @@ DEPENDENCIES=""
END
cd ..
-mkdir -p repo15/{eclass,distfiles,profiles/profile/subprofile} || exit 1
-cd repo15 || exit 1
-echo "test-repo-15" >> profiles/repo_name || exit 1
-cat <<END >profiles/profiles.desc || exit 1
-test profile stable
-test profile/subprofile stable
-END
-cat <<END > profiles/profile/make.defaults || exit 1
-ARCH=test
-END
-cat <<END > profiles/profile/virtuals || exit 1
-virtual/one cat-one/pkg-one
-virtual/two cat-two/pkg-two
-END
-cat <<END >profiles/profile/subprofile/parent || exit 1
-..
-END
-cat <<END > profiles/profile/subprofile/virtuals || exit 1
-virtual/one cat-two/pkg-two
-virtual/two cat-one/pkg-one
-virtual/three cat-three/pkg-three
-END
-cd ..
-
mkdir -p repo16/{eclass,distfiles,profiles/profile} || exit 1
mkdir -p repo16/category/package-{a,b,c} || exit 1
cd repo16 || exit 1
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 5c6c4f4c5..d2963b3c9 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -109,9 +109,7 @@ ExndbamRepository::ExndbamRepository(const RepositoryName & n, const ExndbamRepo
make_named_values<RepositoryCapabilities>(
n::destination_interface() = this,
n::environment_variable_interface() = this,
- n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
- n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
+ n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0)
)),
_imp(p)
{
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 1bc15b5d1..bec8e5cda 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -171,9 +171,7 @@ VDBRepository::VDBRepository(const VDBRepositoryParams & p) :
make_named_values<RepositoryCapabilities>(
n::destination_interface() = this,
n::environment_variable_interface() = this,
- n::make_virtuals_interface() = static_cast<RepositoryMakeVirtualsInterface *>(0),
- n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0),
- n::virtuals_interface() = static_cast<RepositoryVirtualsInterface *>(0)
+ n::manifest_interface() = static_cast<RepositoryManifestInterface *>(0)
)),
_imp(this, p)
{