aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-11 23:18:26 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-11 23:18:38 +0100
commitee28577088fc168cdf81e1b79ecdc7d7c7f4adc6 (patch)
tree8790337fe19b81f485ee63adec26173f45366316
parent9c2ee6d96bbe00dd0b77d652613c7ad5a8dea846 (diff)
downloadpaludis-ee28577088fc168cdf81e1b79ecdc7d7c7f4adc6.tar.gz
paludis-ee28577088fc168cdf81e1b79ecdc7d7c7f4adc6.tar.xz
Don't create virtuals repos
-rw-r--r--paludis/environments/no_config/no_config_environment.cc18
-rw-r--r--paludis/environments/paludis/paludis_config.cc15
-rw-r--r--paludis/environments/portage/portage_environment.cc24
-rw-r--r--paludis/environments/portage/portage_environment.hh2
-rw-r--r--paludis/repositories/e/depend_rdepend_TEST.cc12
-rw-r--r--paludis/repositories/e/e_repository_TEST_0.cc12
-rw-r--r--paludis/repositories/e/e_repository_TEST_ever.cc12
-rw-r--r--paludis/repositories/e/e_repository_TEST_exheres_0.cc12
-rw-r--r--paludis/repositories/e/e_repository_TEST_phases.cc12
-rw-r--r--paludis/resolver/resolver_test.cc30
-rw-r--r--ruby/environment_TEST.rb21
11 files changed, 1 insertions, 169 deletions
diff --git a/paludis/environments/no_config/no_config_environment.cc b/paludis/environments/no_config/no_config_environment.cc
index 29d735a..69ba6a0 100644
--- a/paludis/environments/no_config/no_config_environment.cc
+++ b/paludis/environments/no_config/no_config_environment.cc
@@ -314,14 +314,6 @@ Imp<NoConfigEnvironment>::initialise(NoConfigEnvironment * const env)
if ((! params.master_repository_name().empty()) && (! master_repo) &&
(params.master_repository_name() != stringify(main_repo->name())))
throw ConfigurationError("Can't find repository '" + params.master_repository_name() + "'");
-
-#ifdef ENABLE_VIRTUALS_REPOSITORY
- std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
- v_keys->insert("format", "virtuals");
- if ((*DistributionData::get_instance()->distribution_from_string(env->distribution())).support_old_style_virtuals())
- env->add_repository(-2, RepositoryFactory::get_instance()->create(env,
- std::bind(from_keys, v_keys, std::placeholders::_1)));
-#endif
}
else
{
@@ -338,16 +330,6 @@ Imp<NoConfigEnvironment>::initialise(NoConfigEnvironment * const env)
env->add_repository(1, RepositoryFactory::get_instance()->create(env,
std::bind(from_keys, keys, std::placeholders::_1)));
-
- std::shared_ptr<Map<std::string, std::string> > iv_keys(std::make_shared<Map<std::string, std::string>>());
- iv_keys->insert("root", "/");
- iv_keys->insert("format", "installed_virtuals");
-
-#ifdef ENABLE_VIRTUALS_REPOSITORY
- if ((*DistributionData::get_instance()->distribution_from_string(env->distribution())).support_old_style_virtuals())
- env->add_repository(-2, RepositoryFactory::get_instance()->create(env,
- std::bind(from_keys, iv_keys, std::placeholders::_1)));
-#endif
}
}
diff --git a/paludis/environments/paludis/paludis_config.cc b/paludis/environments/paludis/paludis_config.cc
index 03b5f7b..e722cc5 100644
--- a/paludis/environments/paludis/paludis_config.cc
+++ b/paludis/environments/paludis/paludis_config.cc
@@ -654,21 +654,6 @@ PaludisConfig::PaludisConfig(PaludisEnvironment * const e, const std::string & s
if (_imp->repos.empty())
throw PaludisConfigError("No repositories specified");
-
-#ifdef ENABLE_VIRTUALS_REPOSITORY
- /* add virtuals repositories */
- if ((*DistributionData::get_instance()->distribution_from_string(distribution())).support_old_style_virtuals())
- {
- std::shared_ptr<Map<std::string, std::string> > iv_keys(std::make_shared<Map<std::string, std::string>>());
- iv_keys->insert("root", _imp->root_prefix.empty() ? "/" : _imp->root_prefix);
- iv_keys->insert("format", "installed_virtuals");
- _imp->repos.push_back(std::bind(&from_keys, iv_keys, std::placeholders::_1));
-
- std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
- v_keys->insert("format", "virtuals");
- _imp->repos.push_back(std::bind(&from_keys, v_keys, std::placeholders::_1));
- }
-#endif
}
/* keywords */
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index c6a58c2..2cf90c8 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -264,9 +264,6 @@ PortageEnvironment::PortageEnvironment(const std::string & s) :
/* TODO: load USE etc from env? */
/* repositories */
-
- _add_virtuals_repository();
- _add_installed_virtuals_repository();
if (_imp->vars->get("PORTDIR").empty())
throw PortageEnvironmentConfigurationError("PORTDIR empty or unset");
_add_portdir_repository(FSPath(_imp->vars->get("PORTDIR")));
@@ -462,27 +459,6 @@ PortageEnvironment::_load_profile(const FSPath & d)
}
void
-PortageEnvironment::_add_virtuals_repository()
-{
-#ifdef ENABLE_VIRTUALS_REPOSITORY
- std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
- keys->insert("format", "virtuals");
- add_repository(-2, RepositoryFactory::get_instance()->create(this, std::bind(from_keys, keys, std::placeholders::_1)));
-#endif
-}
-
-void
-PortageEnvironment::_add_installed_virtuals_repository()
-{
-#ifdef ENABLE_VIRTUALS_REPOSITORY
- std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
- keys->insert("root", stringify(preferred_root_key()->parse_value()));
- keys->insert("format", "installed_virtuals");
- add_repository(-1, RepositoryFactory::get_instance()->create(this, std::bind(from_keys, keys, std::placeholders::_1)));
-#endif
-}
-
-void
PortageEnvironment::_add_portdir_repository(const FSPath & portdir)
{
Context context("When creating PORTDIR repository:");
diff --git a/paludis/environments/portage/portage_environment.hh b/paludis/environments/portage/portage_environment.hh
index e7193e0..4c7914a 100644
--- a/paludis/environments/portage/portage_environment.hh
+++ b/paludis/environments/portage/portage_environment.hh
@@ -61,8 +61,6 @@ namespace paludis
Pimp<PortageEnvironment> _imp;
void _load_profile(const FSPath &);
- void _add_virtuals_repository();
- void _add_installed_virtuals_repository();
void _add_portdir_repository(const FSPath &);
void _add_portdir_overlay_repository(const FSPath &);
void _add_ebuild_repository(const FSPath &, const std::string &,
diff --git a/paludis/repositories/e/depend_rdepend_TEST.cc b/paludis/repositories/e/depend_rdepend_TEST.cc
index f8e67b4..1e1d399 100644
--- a/paludis/repositories/e/depend_rdepend_TEST.cc
+++ b/paludis/repositories/e/depend_rdepend_TEST.cc
@@ -129,18 +129,6 @@ TEST_P(DependRdependTest, Works)
std::bind(from_keys, keys, std::placeholders::_1)));
env.add_repository(1, v_repo);
-#ifdef ENABLE_VIRTUALS_REPOSITORY
- std::shared_ptr<Map<std::string, std::string> > iv_keys(std::make_shared<Map<std::string, std::string>>());
- iv_keys->insert("root", "/");
- iv_keys->insert("format", "installed_virtuals");
- env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
- std::bind(from_keys, iv_keys, std::placeholders::_1)));
- std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
- v_keys->insert("format", "virtuals");
- env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
- std::bind(from_keys, v_keys, std::placeholders::_1)));
-#endif
-
InstallAction action(make_named_values<InstallActionOptions>(
n::destination() = v_repo,
n::make_output_manager() = &make_standard_output_manager,
diff --git a/paludis/repositories/e/e_repository_TEST_0.cc b/paludis/repositories/e/e_repository_TEST_0.cc
index 2cf19ff..112147e 100644
--- a/paludis/repositories/e/e_repository_TEST_0.cc
+++ b/paludis/repositories/e/e_repository_TEST_0.cc
@@ -124,18 +124,6 @@ TEST(ERepository, InstallEAPI0)
installed_repo->add_version("cat", "pretend-installed", "1");
env.add_repository(2, installed_repo);
-#ifdef ENABLE_VIRTUALS_REPOSITORY
- std::shared_ptr<Map<std::string, std::string> > iv_keys(std::make_shared<Map<std::string, std::string>>());
- iv_keys->insert("root", "/");
- iv_keys->insert("format", "installed_virtuals");
- env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
- std::bind(from_keys, iv_keys, std::placeholders::_1)));
- std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
- v_keys->insert("format", "virtuals");
- env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
- std::bind(from_keys, v_keys, std::placeholders::_1)));
-#endif
-
InstallAction action(make_named_values<InstallActionOptions>(
n::destination() = installed_repo,
n::make_output_manager() = &make_standard_output_manager,
diff --git a/paludis/repositories/e/e_repository_TEST_ever.cc b/paludis/repositories/e/e_repository_TEST_ever.cc
index b8a689f..880a097 100644
--- a/paludis/repositories/e/e_repository_TEST_ever.cc
+++ b/paludis/repositories/e/e_repository_TEST_ever.cc
@@ -132,18 +132,6 @@ TEST_P(EverTest, Works)
installed_repo->add_version("cat", "pretend-installed", "1")->provide_key()->set_from_string("virtual/virtual-pretend-installed");
env.add_repository(2, installed_repo);
-#ifdef ENABLE_VIRTUALS_REPOSITORY
- std::shared_ptr<Map<std::string, std::string> > iv_keys(std::make_shared<Map<std::string, std::string>>());
- iv_keys->insert("root", "/");
- iv_keys->insert("format", "installed_virtuals");
- env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
- std::bind(from_keys, iv_keys, std::placeholders::_1)));
- std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
- v_keys->insert("format", "virtuals");
- env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
- std::bind(from_keys, v_keys, std::placeholders::_1)));
-#endif
-
InstallAction action(make_named_values<InstallActionOptions>(
n::destination() = installed_repo,
n::make_output_manager() = &make_standard_output_manager,
diff --git a/paludis/repositories/e/e_repository_TEST_exheres_0.cc b/paludis/repositories/e/e_repository_TEST_exheres_0.cc
index 5968f64..def437b 100644
--- a/paludis/repositories/e/e_repository_TEST_exheres_0.cc
+++ b/paludis/repositories/e/e_repository_TEST_exheres_0.cc
@@ -122,18 +122,6 @@ TEST(ERepository, InstallExheres0)
installed_repo->add_version("cat", "pretend-installed", "1")->provide_key()->set_from_string("virtual/virtual-pretend-installed");
env.add_repository(2, installed_repo);
-#ifdef ENABLE_VIRTUALS_REPOSITORY
- std::shared_ptr<Map<std::string, std::string> > iv_keys(std::make_shared<Map<std::string, std::string>>());
- iv_keys->insert("root", "/");
- iv_keys->insert("format", "installed_virtuals");
- env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
- std::bind(from_keys, iv_keys, std::placeholders::_1)));
- std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
- v_keys->insert("format", "virtuals");
- env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
- std::bind(from_keys, v_keys, std::placeholders::_1)));
-#endif
-
InstallAction action(make_named_values<InstallActionOptions>(
n::destination() = installed_repo,
n::make_output_manager() = &make_standard_output_manager,
diff --git a/paludis/repositories/e/e_repository_TEST_phases.cc b/paludis/repositories/e/e_repository_TEST_phases.cc
index e108d79..c0f6998 100644
--- a/paludis/repositories/e/e_repository_TEST_phases.cc
+++ b/paludis/repositories/e/e_repository_TEST_phases.cc
@@ -141,18 +141,6 @@ TEST_P(PhasesTest, Works)
installed_repo->add_version("cat", "pretend-installed", "1")->provide_key()->set_from_string("virtual/virtual-pretend-installed");
env.add_repository(2, installed_repo);
-#ifdef ENABLE_VIRTUALS_REPOSITORY
- std::shared_ptr<Map<std::string, std::string> > iv_keys(std::make_shared<Map<std::string, std::string>>());
- iv_keys->insert("root", "/");
- iv_keys->insert("format", "installed_virtuals");
- env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
- std::bind(from_keys, iv_keys, std::placeholders::_1)));
- std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
- v_keys->insert("format", "virtuals");
- env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
- std::bind(from_keys, v_keys, std::placeholders::_1)));
-#endif
-
if (info.enable_expensive_tests)
env.set_want_choice_enabled(ChoicePrefixName("build_options"), UnprefixedChoiceName("expensive_tests"), true);
diff --git a/paludis/resolver/resolver_test.cc b/paludis/resolver/resolver_test.cc
index 4078fb6..492577e 100644
--- a/paludis/resolver/resolver_test.cc
+++ b/paludis/resolver/resolver_test.cc
@@ -75,31 +75,6 @@ paludis::resolver::resolver_test::from_keys(const std::shared_ptr<const Map<std:
return mm->second;
}
-namespace
-{
-#ifdef ENABLE_VIRTUALS_REPOSITORY
- std::string virtuals_repo_keys(const std::string & k)
- {
- if (k == "format")
- return "virtuals";
- else if (k == "root")
- return "/";
- else
- return "";
- }
-
- std::string installed_virtuals_repo_keys(const std::string & k)
- {
- if (k == "format")
- return "installed_virtuals";
- else if (k == "root")
- return "/";
- else
- return "";
- }
-#endif
-}
-
ResolverTestData::ResolverTestData(const std::string & t, const std::string & e, const std::string & l) :
allow_choice_changes_helper(&env),
allowed_to_remove_helper(&env),
@@ -160,11 +135,6 @@ ResolverTestData::ResolverTestData(const std::string & t, const std::string & e,
));
env.add_repository(1, fake_inst_repo);
-#ifdef ENABLE_VIRTUALS_REPOSITORY
- env.add_repository(0, RepositoryFactory::get_instance()->create(&env, virtuals_repo_keys));
- env.add_repository(0, RepositoryFactory::get_instance()->create(&env, installed_virtuals_repo_keys));
-#endif
-
interest_in_spec_helper.set_follow_installed_dependencies(true);
interest_in_spec_helper.set_follow_installed_build_dependencies(true);
diff --git a/ruby/environment_TEST.rb b/ruby/environment_TEST.rb
index d69dd8e..a67dc3d 100644
--- a/ruby/environment_TEST.rb
+++ b/ruby/environment_TEST.rb
@@ -391,11 +391,7 @@ module Paludis
end
def test_repositories
- if ENV["PALUDIS_ENABLE_VIRTUALS_REPOSITORY"] == "yes" then
- assert_equal 3, env.repositories.length
- else
- assert_equal 1, env.repositories.length
- end
+ assert_equal 1, env.repositories.length
a = env.repositories.find_all do | repo |
repo.name == "testrepo"
@@ -418,23 +414,8 @@ module Paludis
end
end
- def test_more_important_than
- if ENV["PALUDIS_ENABLE_VIRTUALS_REPOSITORY"] == "yes" then
- assert env.more_important_than('testrepo', 'virtuals')
- assert ! env.more_important_than('virtuals', 'testrepo')
- elsif ENV["PALUDIS_ENABLE_VIRTUALS_REPOSITORY"] == "no" then
- else
- throw "oops"
- end
- end
-
def test_has_repository_named?
assert env.has_repository_named?('testrepo')
- if ENV["PALUDIS_ENABLE_VIRTUALS_REPOSITORY"] == "yes" then
- assert env.has_repository_named?('virtuals')
- else
- assert ! env.has_repository_named?('virtuals')
- end
assert ! env.has_repository_named?('foobarbaz')
end
end