aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-26 18:58:38 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-26 19:00:38 +0000
commit5c2a332b70243cb583a29bb74f712bfca2c1fb76 (patch)
tree0a01f8e624caa2c6639181df45fa80bc20adba84 /paludis/repositories
parent79d9f02fb355d81c472f3d94b8b85d5a7639210c (diff)
downloadpaludis-5c2a332b70243cb583a29bb74f712bfca2c1fb76.tar.gz
paludis-5c2a332b70243cb583a29bb74f712bfca2c1fb76.tar.xz
Use Environment rather than PackageDatabase
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/accounts/accounts_id.cc3
-rw-r--r--paludis/repositories/accounts/accounts_repository.cc3
-rw-r--r--paludis/repositories/accounts/accounts_repository_TEST.cc3
-rw-r--r--paludis/repositories/accounts/accounts_repository_store.cc4
-rw-r--r--paludis/repositories/e/aa_visitor_TEST.cc3
-rw-r--r--paludis/repositories/e/dep_parser.cc1
-rw-r--r--paludis/repositories/e/dep_parser_TEST.cc35
-rw-r--r--paludis/repositories/e/depend_rdepend_TEST.cc9
-rw-r--r--paludis/repositories/e/do_fetch_action.cc6
-rw-r--r--paludis/repositories/e/do_info_action.cc6
-rw-r--r--paludis/repositories/e/do_install_action.cc3
-rw-r--r--paludis/repositories/e/do_pretend_action.cc6
-rw-r--r--paludis/repositories/e/do_pretend_fetch_action.cc5
-rw-r--r--paludis/repositories/e/e_installed_repository.cc13
-rw-r--r--paludis/repositories/e/e_installed_repository_id.cc7
-rw-r--r--paludis/repositories/e/e_repository.cc7
-rw-r--r--paludis/repositories/e/e_repository.hh1
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc26
-rw-r--r--paludis/repositories/e/e_repository_TEST_0.cc8
-rw-r--r--paludis/repositories/e/e_repository_TEST_1.cc4
-rw-r--r--paludis/repositories/e/e_repository_TEST_2.cc4
-rw-r--r--paludis/repositories/e/e_repository_TEST_3.cc4
-rw-r--r--paludis/repositories/e/e_repository_TEST_4.cc18
-rw-r--r--paludis/repositories/e/e_repository_TEST_ever.cc8
-rw-r--r--paludis/repositories/e/e_repository_TEST_exheres_0.cc8
-rw-r--r--paludis/repositories/e/e_repository_TEST_exlibs.cc4
-rw-r--r--paludis/repositories/e/e_repository_TEST_pbin.cc6
-rw-r--r--paludis/repositories/e/e_repository_TEST_phases.cc8
-rw-r--r--paludis/repositories/e/e_repository_TEST_replacing.cc4
-rw-r--r--paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc4
-rw-r--r--paludis/repositories/e/e_repository_params.hh3
-rw-r--r--paludis/repositories/e/e_repository_sets_TEST.cc13
-rw-r--r--paludis/repositories/e/ebuild.cc2
-rw-r--r--paludis/repositories/e/ebuild.hh12
-rw-r--r--paludis/repositories/e/ebuild_flat_metadata_cache.cc17
-rw-r--r--paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc87
-rw-r--r--paludis/repositories/e/ebuild_id.cc21
-rw-r--r--paludis/repositories/e/exheres_layout.cc1
-rw-r--r--paludis/repositories/e/exndbam_repository.cc4
-rw-r--r--paludis/repositories/e/exndbam_repository_TEST.cc4
-rw-r--r--paludis/repositories/e/fetch_visitor.cc3
-rw-r--r--paludis/repositories/e/fetch_visitor_TEST.cc3
-rw-r--r--paludis/repositories/e/fix_locked_dependencies.cc1
-rw-r--r--paludis/repositories/e/fix_locked_dependencies_TEST.cc5
-rw-r--r--paludis/repositories/e/parse_dependency_label.cc7
-rw-r--r--paludis/repositories/e/pipe_command_handler.cc10
-rw-r--r--paludis/repositories/e/source_uri_finder_TEST.cc7
-rw-r--r--paludis/repositories/e/traditional_layout.cc1
-rw-r--r--paludis/repositories/e/vdb_merger.cc4
-rw-r--r--paludis/repositories/e/vdb_repository.cc6
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc17
-rw-r--r--paludis/repositories/e/vdb_repository_TEST_cache.cc13
-rw-r--r--paludis/repositories/e/vdb_repository_TEST_eapis.cc9
-rw-r--r--paludis/repositories/e/vdb_unmerger.cc17
-rw-r--r--paludis/repositories/e/vdb_unmerger_TEST.cc3
-rw-r--r--paludis/repositories/fake/fake_package_id.cc21
-rw-r--r--paludis/repositories/gemcutter/gemcutter_repository_store.cc1
-rw-r--r--paludis/repositories/repository/repository_repository.cc3
-rw-r--r--paludis/repositories/repository/repository_repository_store.cc4
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_TEST.cc7
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_store.cc3
-rw-r--r--paludis/repositories/unpackaged/installed_id.cc11
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc5
-rw-r--r--paludis/repositories/unpackaged/installed_repository_TEST.cc32
-rw-r--r--paludis/repositories/unpackaged/unpackaged_id.cc5
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository_TEST.cc17
-rw-r--r--paludis/repositories/unwritten/unwritten_repository_TEST.cc5
-rw-r--r--paludis/repositories/unwritten/unwritten_repository_store.cc1
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc9
-rw-r--r--paludis/repositories/virtuals/package_id.cc17
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc7
-rw-r--r--paludis/repositories/virtuals/virtuals_repository_TEST.cc22
72 files changed, 341 insertions, 320 deletions
diff --git a/paludis/repositories/accounts/accounts_id.cc b/paludis/repositories/accounts/accounts_id.cc
index 6755da625..e8a13e840 100644
--- a/paludis/repositories/accounts/accounts_id.cc
+++ b/paludis/repositories/accounts/accounts_id.cc
@@ -38,7 +38,6 @@
#include <paludis/literal_metadata_key.hh>
#include <paludis/environment.hh>
#include <paludis/repository.hh>
-#include <paludis/package_database.hh>
#include <paludis/action.hh>
#include <paludis/user_dep_spec.hh>
#include <algorithm>
@@ -561,7 +560,7 @@ AccountsID::perform_action(Action & action) const
i != i_end ; ++i)
{
Context local_context("When cleaning '" + stringify(**i) + "':");
- auto repo(_imp->env->package_database()->fetch_repository((*i)->repository_name()));
+ auto repo(_imp->env->fetch_repository((*i)->repository_name()));
if (repo->format_key() && repo->format_key()->value() == "installed-accounts"
&& (*i)->name() == name())
continue;
diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc
index 5400bacb1..55e8560a0 100644
--- a/paludis/repositories/accounts/accounts_repository.cc
+++ b/paludis/repositories/accounts/accounts_repository.cc
@@ -39,7 +39,6 @@
#include <paludis/filtered_generator.hh>
#include <paludis/hook.hh>
#include <paludis/common_sets.hh>
-#include <paludis/package_database.hh>
using namespace paludis;
using namespace paludis::accounts_repository;
@@ -397,7 +396,7 @@ bool
AccountsRepository::is_suitable_destination_for(const std::shared_ptr<const PackageID> & id) const
{
auto env(_imp->params_if_installed ? _imp->params_if_installed->environment() : _imp->params_if_not_installed->environment());
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
std::string f(repo->format_key() ? repo->format_key()->value() : "");
return _imp->handler_if_installed && f == "accounts";
}
diff --git a/paludis/repositories/accounts/accounts_repository_TEST.cc b/paludis/repositories/accounts/accounts_repository_TEST.cc
index b96035bee..49aa1e8bc 100644
--- a/paludis/repositories/accounts/accounts_repository_TEST.cc
+++ b/paludis/repositories/accounts/accounts_repository_TEST.cc
@@ -32,7 +32,6 @@
#include <paludis/filtered_generator.hh>
#include <paludis/filter.hh>
#include <paludis/package_id.hh>
-#include <paludis/package_database.hh>
#include <memory>
@@ -49,6 +48,6 @@ TEST(AccountsRepository, Creation)
n::environment() = &env,
n::name() = RepositoryName("accounts")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
EXPECT_EQ("accounts", stringify(repo->name()));
}
diff --git a/paludis/repositories/accounts/accounts_repository_store.cc b/paludis/repositories/accounts/accounts_repository_store.cc
index fb782e316..879c224c3 100644
--- a/paludis/repositories/accounts/accounts_repository_store.cc
+++ b/paludis/repositories/accounts/accounts_repository_store.cc
@@ -35,7 +35,6 @@
#include <paludis/util/strip.hh>
#include <paludis/util/fs_stat.hh>
#include <paludis/name.hh>
-#include <paludis/package_database.hh>
#include <paludis/metadata_key.hh>
#include <paludis/environment.hh>
#include <paludis/literal_metadata_key.hh>
@@ -101,8 +100,7 @@ AccountsRepositoryStore::_load(const RepositoryName & repository_name)
{
Context context("When loading data for AccountsRepository:");
- for (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
- r_end(_imp->env->package_database()->end_repositories()) ;
+ for (auto r(_imp->env->begin_repositories()), r_end(_imp->env->end_repositories()) ;
r != r_end ; ++r)
{
Context r_context("When loading data for repository '" + stringify((*r)->name()) + ":");
diff --git a/paludis/repositories/e/aa_visitor_TEST.cc b/paludis/repositories/e/aa_visitor_TEST.cc
index 4d47e41d8..9c29e197d 100644
--- a/paludis/repositories/e/aa_visitor_TEST.cc
+++ b/paludis/repositories/e/aa_visitor_TEST.cc
@@ -25,7 +25,6 @@
#include <paludis/environments/test/test_environment.hh>
#include <paludis/repositories/fake/fake_repository.hh>
#include <paludis/repositories/fake/fake_package_id.hh>
-#include <paludis/package_database.hh>
#include <test/test_runner.hh>
#include <test/test_framework.hh>
@@ -45,7 +44,7 @@ namespace test_cases
std::shared_ptr<FakeRepository> repo(std::make_shared<FakeRepository>(make_named_values<FakeRepositoryParams>(
n::environment() = &env,
n::name() = RepositoryName("repo"))));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
AAVisitor p1;
diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc
index 7825cc302..bab3e7c30 100644
--- a/paludis/repositories/e/dep_parser.cc
+++ b/paludis/repositories/e/dep_parser.cc
@@ -46,7 +46,6 @@
#include <paludis/choice.hh>
#include <paludis/dep_spec_annotations.hh>
#include <paludis/metadata_key.hh>
-#include <paludis/package_database.hh>
#include <paludis/always_enabled_dependency_label.hh>
#include <paludis/elike_blocker.hh>
#include <map>
diff --git a/paludis/repositories/e/dep_parser_TEST.cc b/paludis/repositories/e/dep_parser_TEST.cc
index b8f53cc5d..9cd51f374 100644
--- a/paludis/repositories/e/dep_parser_TEST.cc
+++ b/paludis/repositories/e/dep_parser_TEST.cc
@@ -23,7 +23,6 @@
#include <paludis/environments/test/test_environment.hh>
#include <paludis/repositories/fake/fake_repository.hh>
#include <paludis/repositories/fake/fake_package_id.hh>
-#include <paludis/package_database.hh>
#include <paludis/unformatted_pretty_printer.hh>
#include <paludis/util/make_named_values.hh>
#include <sstream>
@@ -56,7 +55,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
UnformattedPrettyPrinter ff;
@@ -82,7 +81,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
UnformattedPrettyPrinter ff;
@@ -108,7 +107,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
UnformattedPrettyPrinter ff;
@@ -135,7 +134,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
SpecTreePrettyPrinter d1(ff, { });
@@ -171,7 +170,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
SpecTreePrettyPrinter d(ff, { });
@@ -193,7 +192,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
SpecTreePrettyPrinter d(ff, { });
@@ -215,7 +214,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
SpecTreePrettyPrinter d(ff, { });
@@ -249,7 +248,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
SpecTreePrettyPrinter d(ff, { });
@@ -275,7 +274,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
SpecTreePrettyPrinter d(ff, { });
@@ -300,7 +299,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
SpecTreePrettyPrinter d(ff, { });
@@ -321,7 +320,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
SpecTreePrettyPrinter d(ff, { ppo_multiline_allowed });
@@ -353,7 +352,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
SpecTreePrettyPrinter d(ff, { });
@@ -386,7 +385,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
SpecTreePrettyPrinter d(ff, { });
@@ -441,7 +440,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
SpecTreePrettyPrinter d(ff, { });
@@ -465,7 +464,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
SpecTreePrettyPrinter d(ff, { });
@@ -488,7 +487,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
UnformattedPrettyPrinter ff;
@@ -516,7 +515,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
UnformattedPrettyPrinter ff;
diff --git a/paludis/repositories/e/depend_rdepend_TEST.cc b/paludis/repositories/e/depend_rdepend_TEST.cc
index f1bf6ee98..e0125deb7 100644
--- a/paludis/repositories/e/depend_rdepend_TEST.cc
+++ b/paludis/repositories/e/depend_rdepend_TEST.cc
@@ -26,7 +26,6 @@
#include <paludis/util/sequence.hh>
#include <paludis/repository_factory.hh>
#include <paludis/repository.hh>
-#include <paludis/package_database.hh>
#include <paludis/standard_output_manager.hh>
#include <paludis/action.hh>
#include <paludis/selection.hh>
@@ -120,7 +119,7 @@ namespace
keys->insert("root", stringify(root));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
v_keys->insert("format", "vdb");
@@ -130,17 +129,17 @@ namespace
v_keys->insert("root", stringify(root));
std::shared_ptr<Repository> v_repo(VDBRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, v_repo);
+ 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.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
+ 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.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
+ env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, v_keys, std::placeholders::_1)));
#endif
diff --git a/paludis/repositories/e/do_fetch_action.cc b/paludis/repositories/e/do_fetch_action.cc
index 46ac11803..d79ec5653 100644
--- a/paludis/repositories/e/do_fetch_action.cc
+++ b/paludis/repositories/e/do_fetch_action.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -28,10 +28,14 @@
#include <paludis/repositories/e/make_use.hh>
#include <paludis/repositories/e/can_skip_phase.hh>
#include <paludis/repositories/e/ebuild.hh>
+
#include <paludis/util/strip.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/wrapped_output_iterator.hh>
+#include <paludis/util/stringify.hh>
+#include <paludis/util/join.hh>
+
#include <paludis/dep_spec_flattener.hh>
#include <paludis/metadata_key.hh>
#include <paludis/environment.hh>
diff --git a/paludis/repositories/e/do_info_action.cc b/paludis/repositories/e/do_info_action.cc
index 54d4f70e0..2d89dfe99 100644
--- a/paludis/repositories/e/do_info_action.cc
+++ b/paludis/repositories/e/do_info_action.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -23,8 +23,12 @@
#include <paludis/repositories/e/check_userpriv.hh>
#include <paludis/repositories/e/make_use.hh>
#include <paludis/repositories/e/ebuild.hh>
+
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/make_named_values.hh>
+#include <paludis/util/stringify.hh>
+#include <paludis/util/join.hh>
+
#include <paludis/dep_spec_flattener.hh>
#include <paludis/action.hh>
#include <paludis/metadata_key.hh>
diff --git a/paludis/repositories/e/do_install_action.cc b/paludis/repositories/e/do_install_action.cc
index d12349040..bcd550a27 100644
--- a/paludis/repositories/e/do_install_action.cc
+++ b/paludis/repositories/e/do_install_action.cc
@@ -28,12 +28,15 @@
#include <paludis/repositories/e/can_skip_phase.hh>
#include <paludis/repositories/e/e_stripper.hh>
#include <paludis/repositories/e/ebuild.hh>
+
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/accept_visitor.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/fs_stat.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/join.hh>
+
#include <paludis/action.hh>
#include <paludis/dep_spec_flattener.hh>
#include <paludis/metadata_key.hh>
diff --git a/paludis/repositories/e/do_pretend_action.cc b/paludis/repositories/e/do_pretend_action.cc
index d55fc8f19..a282dc306 100644
--- a/paludis/repositories/e/do_pretend_action.cc
+++ b/paludis/repositories/e/do_pretend_action.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -26,8 +26,12 @@
#include <paludis/repositories/e/required_use_verifier.hh>
#include <paludis/repositories/e/ebuild.hh>
#include <paludis/repositories/e/can_skip_phase.hh>
+
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/make_named_values.hh>
+#include <paludis/util/stringify.hh>
+#include <paludis/util/join.hh>
+
#include <paludis/dep_spec_flattener.hh>
#include <paludis/metadata_key.hh>
#include <paludis/environment.hh>
diff --git a/paludis/repositories/e/do_pretend_fetch_action.cc b/paludis/repositories/e/do_pretend_fetch_action.cc
index af9a0f0ed..e455b0357 100644
--- a/paludis/repositories/e/do_pretend_fetch_action.cc
+++ b/paludis/repositories/e/do_pretend_fetch_action.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -19,6 +19,9 @@
#include <paludis/repositories/e/do_pretend_fetch_action.hh>
#include <paludis/repositories/e/pretend_fetch_visitor.hh>
+
+#include <paludis/util/stringify.hh>
+
#include <paludis/action.hh>
#include <paludis/metadata_key.hh>
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index 2c670d198..4c07d8ad0 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -24,6 +24,7 @@
#include <paludis/repositories/e/eapi_phase.hh>
#include <paludis/repositories/e/ebuild.hh>
#include <paludis/repositories/e/e_repository.hh>
+
#include <paludis/util/visitor_cast.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/mutex.hh>
@@ -39,6 +40,8 @@
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/process.hh>
#include <paludis/util/fs_stat.hh>
+#include <paludis/util/join.hh>
+
#include <paludis/action.hh>
#include <paludis/package_id.hh>
#include <paludis/metadata_key.hh>
@@ -139,7 +142,7 @@ EInstalledRepository::some_ids_might_not_be_masked() const
bool
EInstalledRepository::is_suitable_destination_for(const std::shared_ptr<const PackageID> & id) const
{
- auto repo(_imp->params.environment()->package_database()->fetch_repository(id->repository_name()));
+ auto repo(_imp->params.environment()->fetch_repository(id->repository_name()));
std::string f(repo->format_key() ? repo->format_key()->value() : "");
return f == "e" || f == "ebuild" || f == "exheres" || f == "portage";
}
@@ -311,10 +314,10 @@ EInstalledRepository::perform_info(
o != o_end ; ++o)
{
RepositoryName rn(*o);
- if (_imp->params.environment()->package_database()->has_repository_named(rn))
+ if (_imp->params.environment()->has_repository_named(rn))
{
const std::shared_ptr<const Repository> r(
- _imp->params.environment()->package_database()->fetch_repository(rn));
+ _imp->params.environment()->fetch_repository(rn));
Repository::MetadataConstIterator m(r->find_metadata("info_vars"));
if (r->end_metadata() != m)
{
@@ -333,9 +336,7 @@ EInstalledRepository::perform_info(
/* try to find an info_vars file from any repo */
if (! i)
{
- for (PackageDatabase::RepositoryConstIterator
- r(_imp->params.environment()->package_database()->begin_repositories()),
- r_end(_imp->params.environment()->package_database()->end_repositories()) ;
+ for (auto r(_imp->params.environment()->begin_repositories()), r_end(_imp->params.environment()->end_repositories()) ;
r != r_end ; ++r)
{
Repository::MetadataConstIterator m((*r)->find_metadata("info_vars"));
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc
index ec8cf9954..da4b28cfd 100644
--- a/paludis/repositories/e/e_installed_repository_id.cc
+++ b/paludis/repositories/e/e_installed_repository_id.cc
@@ -50,7 +50,6 @@
#include <paludis/literal_metadata_key.hh>
#include <paludis/user_dep_spec.hh>
#include <paludis/elike_choices.hh>
-#include <paludis/package_database.hh>
#include <paludis/always_enabled_dependency_label.hh>
#include <iterator>
@@ -972,19 +971,19 @@ namespace
void visit(const UninstallAction & a)
{
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
std::static_pointer_cast<const EInstalledRepository>(repo)->perform_uninstall(id, a);
}
void visit(const ConfigAction & a)
{
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
std::static_pointer_cast<const EInstalledRepository>(repo)->perform_config(id, a);
}
void visit(const InfoAction & a)
{
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
std::static_pointer_cast<const EInstalledRepository>(repo)->perform_info(id, a);
}
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index df5b02381..31748aa94 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -73,6 +73,7 @@
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/iterator_funcs.hh>
+#include <paludis/util/join.hh>
#include <paludis/util/log.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/make_null_shared_ptr.hh>
@@ -926,7 +927,7 @@ ERepository::params() const
bool
ERepository::is_suitable_destination_for(const std::shared_ptr<const PackageID> & id) const
{
- auto repo(_imp->params.environment()->package_database()->fetch_repository(id->repository_name()));
+ auto repo(_imp->params.environment()->fetch_repository(id->repository_name()));
std::string f(repo->format_key() ? repo->format_key()->value() : "");
if (f == "e")
return static_cast<const ERepositoryID &>(*id).eapi()->supported()->can_be_pbin();
@@ -1214,7 +1215,7 @@ ERepository::repository_factory_create(
RepositoryName master_repository_name(f("master_repository"));
std::shared_ptr<Repository> master_repository_uncasted(
- env->package_database()->fetch_repository(master_repository_name));
+ env->fetch_repository(master_repository_name));
std::string format("unknown");
if (master_repository_uncasted->format_key())
@@ -1248,7 +1249,7 @@ ERepository::repository_factory_create(
try
{
std::shared_ptr<Repository> master_repository_uncasted(
- env->package_database()->fetch_repository(master_repository_name));
+ env->fetch_repository(master_repository_name));
std::string format("unknown");
if (master_repository_uncasted->format_key())
diff --git a/paludis/repositories/e/e_repository.hh b/paludis/repositories/e/e_repository.hh
index 3fc9c5e77..0a78c6941 100644
--- a/paludis/repositories/e/e_repository.hh
+++ b/paludis/repositories/e/e_repository.hh
@@ -21,7 +21,6 @@
#define PALUDIS_GUARD_PALUDIS_E_REPOSITORY_HH 1
#include <paludis/repository.hh>
-#include <paludis/package_database.hh>
#include <paludis/mask-fwd.hh>
#include <paludis/util/pimp.hh>
#include <paludis/repositories/e/e_repository_params.hh>
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 39ad42a2e..709fcdf5a 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -379,7 +379,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
for (int pass = 1 ; pass <= 2 ; ++pass)
{
@@ -424,7 +424,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
for (int pass = 1 ; pass <= 2 ; ++pass)
{
@@ -477,7 +477,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
for (int pass = 1 ; pass <= 3 ; ++pass)
{
@@ -557,7 +557,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
for (int pass = 1 ; pass <= 2 ; ++pass)
{
@@ -600,7 +600,7 @@ namespace test_cases
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.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
for (int pass = 1 ; pass <= 2 ; ++pass)
{
@@ -680,7 +680,7 @@ namespace test_cases
keys18->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "build"));
std::shared_ptr<Repository> repo18(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys18, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo18);
+ env.add_repository(1, repo18);
std::shared_ptr<Map<std::string, std::string> > keys19(std::make_shared<Map<std::string, std::string>>());
keys19->insert("format", "e");
@@ -690,7 +690,7 @@ namespace test_cases
keys19->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "build"));
std::shared_ptr<Repository> repo19(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys19, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo19);
+ env.add_repository(1, repo19);
TEST_CHECK((*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=category/package-1::test-repo-18",
@@ -735,7 +735,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
for (int pass = 1 ; pass <= 2 ; ++pass)
{
@@ -769,7 +769,7 @@ namespace test_cases
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.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
bool has_one(false), has_two(false);
int count(0);
@@ -810,7 +810,7 @@ namespace test_cases
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.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
bool has_one(false), has_two(false), has_three(false);
int count(0);
@@ -857,7 +857,7 @@ namespace test_cases
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.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
repo->make_manifest(QualifiedPackageName("category/package"));
std::multiset<std::string> made_manifest, reference_manifest;
@@ -907,7 +907,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
FetchAction action(make_named_values<FetchActionOptions>(
n::errors() = std::make_shared<Sequence<FetchActionFailure>>(),
@@ -1014,7 +1014,7 @@ namespace test_cases
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.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
FetchAction action(make_named_values<FetchActionOptions>(
n::errors() = std::make_shared<Sequence<FetchActionFailure>>(),
diff --git a/paludis/repositories/e/e_repository_TEST_0.cc b/paludis/repositories/e/e_repository_TEST_0.cc
index 99eb4a710..b942f67ff 100644
--- a/paludis/repositories/e/e_repository_TEST_0.cc
+++ b/paludis/repositories/e/e_repository_TEST_0.cc
@@ -122,7 +122,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_0_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
@@ -133,17 +133,17 @@ namespace test_cases
)));
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");
- env.package_database()->add_repository(2, installed_repo);
+ 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.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
+ 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.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
+ env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, v_keys, std::placeholders::_1)));
#endif
diff --git a/paludis/repositories/e/e_repository_TEST_1.cc b/paludis/repositories/e/e_repository_TEST_1.cc
index b25028c0d..7e6f853b6 100644
--- a/paludis/repositories/e/e_repository_TEST_1.cc
+++ b/paludis/repositories/e/e_repository_TEST_1.cc
@@ -115,7 +115,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_1_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
@@ -124,7 +124,7 @@ namespace test_cases
n::suitable_destination() = true,
n::supports_uninstall() = true
)));
- env.package_database()->add_repository(2, installed_repo);
+ env.add_repository(2, installed_repo);
InstallAction action(make_named_values<InstallActionOptions>(
n::destination() = installed_repo,
diff --git a/paludis/repositories/e/e_repository_TEST_2.cc b/paludis/repositories/e/e_repository_TEST_2.cc
index 54db72039..16d5fdb1d 100644
--- a/paludis/repositories/e/e_repository_TEST_2.cc
+++ b/paludis/repositories/e/e_repository_TEST_2.cc
@@ -115,7 +115,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_2_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
@@ -124,7 +124,7 @@ namespace test_cases
n::suitable_destination() = true,
n::supports_uninstall() = true
)));
- env.package_database()->add_repository(2, installed_repo);
+ env.add_repository(2, installed_repo);
InstallAction action(make_named_values<InstallActionOptions>(
n::destination() = installed_repo,
diff --git a/paludis/repositories/e/e_repository_TEST_3.cc b/paludis/repositories/e/e_repository_TEST_3.cc
index 45d186c45..79c0e02d5 100644
--- a/paludis/repositories/e/e_repository_TEST_3.cc
+++ b/paludis/repositories/e/e_repository_TEST_3.cc
@@ -115,7 +115,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_3_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
@@ -124,7 +124,7 @@ namespace test_cases
n::suitable_destination() = true,
n::supports_uninstall() = true
)));
- env.package_database()->add_repository(2, installed_repo);
+ env.add_repository(2, installed_repo);
InstallAction action(make_named_values<InstallActionOptions>(
n::destination() = installed_repo,
diff --git a/paludis/repositories/e/e_repository_TEST_4.cc b/paludis/repositories/e/e_repository_TEST_4.cc
index 3492f6534..141cd3a9a 100644
--- a/paludis/repositories/e/e_repository_TEST_4.cc
+++ b/paludis/repositories/e/e_repository_TEST_4.cc
@@ -116,7 +116,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_4_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
@@ -125,7 +125,7 @@ namespace test_cases
n::suitable_destination() = true,
n::supports_uninstall() = true
)));
- env.package_database()->add_repository(2, installed_repo);
+ env.add_repository(2, installed_repo);
InstallAction action(make_named_values<InstallActionOptions>(
n::destination() = installed_repo,
@@ -277,7 +277,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_4_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
v_keys->insert("format", "vdb");
@@ -287,7 +287,7 @@ namespace test_cases
v_keys->insert("root", stringify(root));
std::shared_ptr<Repository> v_repo(VDBRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, v_repo);
+ env.add_repository(1, v_repo);
{
InstallAction action(make_named_values<InstallActionOptions>(
@@ -343,7 +343,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_4_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<Map<std::string, std::string> > b_keys(std::make_shared<Map<std::string, std::string>>());
b_keys->insert("format", "e");
@@ -363,7 +363,7 @@ namespace test_cases
b_keys->insert("root", stringify(root));
std::shared_ptr<Repository> b_repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, b_keys, std::placeholders::_1)));
- env.package_database()->add_repository(2, b_repo);
+ env.add_repository(2, b_repo);
std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
v_keys->insert("format", "vdb");
@@ -373,7 +373,7 @@ namespace test_cases
v_keys->insert("root", stringify(root));
std::shared_ptr<Repository> v_repo(VDBRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, v_repo);
+ env.add_repository(1, v_repo);
{
InstallAction action(make_named_values<InstallActionOptions>(
@@ -448,7 +448,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_4_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
@@ -457,7 +457,7 @@ namespace test_cases
n::suitable_destination() = true,
n::supports_uninstall() = true
)));
- env.package_database()->add_repository(2, installed_repo);
+ env.add_repository(2, installed_repo);
{
PretendAction pretend_action(make_named_values<PretendActionOptions>(
diff --git a/paludis/repositories/e/e_repository_TEST_ever.cc b/paludis/repositories/e/e_repository_TEST_ever.cc
index 5aa7813e0..f1fd198e1 100644
--- a/paludis/repositories/e/e_repository_TEST_ever.cc
+++ b/paludis/repositories/e/e_repository_TEST_ever.cc
@@ -123,7 +123,7 @@ namespace
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_ever_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
@@ -134,17 +134,17 @@ namespace
)));
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");
- env.package_database()->add_repository(2, installed_repo);
+ 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.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
+ 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.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
+ env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, v_keys, std::placeholders::_1)));
#endif
diff --git a/paludis/repositories/e/e_repository_TEST_exheres_0.cc b/paludis/repositories/e/e_repository_TEST_exheres_0.cc
index 3eea8c5a4..31cb7f15f 100644
--- a/paludis/repositories/e/e_repository_TEST_exheres_0.cc
+++ b/paludis/repositories/e/e_repository_TEST_exheres_0.cc
@@ -120,7 +120,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_exheres_0_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
@@ -131,17 +131,17 @@ namespace test_cases
)));
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");
- env.package_database()->add_repository(2, installed_repo);
+ 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.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
+ 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.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
+ env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, v_keys, std::placeholders::_1)));
#endif
diff --git a/paludis/repositories/e/e_repository_TEST_exlibs.cc b/paludis/repositories/e/e_repository_TEST_exlibs.cc
index 505f220c9..3d5af11fb 100644
--- a/paludis/repositories/e/e_repository_TEST_exlibs.cc
+++ b/paludis/repositories/e/e_repository_TEST_exlibs.cc
@@ -131,7 +131,7 @@ namespace
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_exlibs_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
@@ -140,7 +140,7 @@ namespace
n::suitable_destination() = true,
n::supports_uninstall() = true
)));
- env.package_database()->add_repository(2, installed_repo);
+ env.add_repository(2, installed_repo);
InstallAction action(make_named_values<InstallActionOptions>(
n::destination() = installed_repo,
diff --git a/paludis/repositories/e/e_repository_TEST_pbin.cc b/paludis/repositories/e/e_repository_TEST_pbin.cc
index c27bca9e4..27a46b6d5 100644
--- a/paludis/repositories/e/e_repository_TEST_pbin.cc
+++ b/paludis/repositories/e/e_repository_TEST_pbin.cc
@@ -125,7 +125,7 @@ namespace test_cases
keys->insert("root", stringify(root));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<Map<std::string, std::string> > b_keys(std::make_shared<Map<std::string, std::string>>());
b_keys->insert("format", "e");
@@ -145,7 +145,7 @@ namespace test_cases
b_keys->insert("root", stringify(root));
std::shared_ptr<Repository> b_repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, b_keys, std::placeholders::_1)));
- env.package_database()->add_repository(2, b_repo);
+ env.add_repository(2, b_repo);
std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>());
v_keys->insert("format", "vdb");
@@ -155,7 +155,7 @@ namespace test_cases
v_keys->insert("root", stringify(root));
std::shared_ptr<Repository> v_repo(VDBRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, v_repo);
+ env.add_repository(1, v_repo);
{
InstallAction bin_action(make_named_values<InstallActionOptions>(
diff --git a/paludis/repositories/e/e_repository_TEST_phases.cc b/paludis/repositories/e/e_repository_TEST_phases.cc
index 29728e89a..b20afd33c 100644
--- a/paludis/repositories/e/e_repository_TEST_phases.cc
+++ b/paludis/repositories/e/e_repository_TEST_phases.cc
@@ -131,7 +131,7 @@ namespace
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_phases_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
@@ -142,17 +142,17 @@ namespace
)));
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");
- env.package_database()->add_repository(2, installed_repo);
+ 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.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
+ 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.package_database()->add_repository(-2, RepositoryFactory::get_instance()->create(&env,
+ env.add_repository(-2, RepositoryFactory::get_instance()->create(&env,
std::bind(from_keys, v_keys, std::placeholders::_1)));
#endif
diff --git a/paludis/repositories/e/e_repository_TEST_replacing.cc b/paludis/repositories/e/e_repository_TEST_replacing.cc
index 93b8defc2..17c236367 100644
--- a/paludis/repositories/e/e_repository_TEST_replacing.cc
+++ b/paludis/repositories/e/e_repository_TEST_replacing.cc
@@ -127,7 +127,7 @@ namespace
keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_replacing_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
@@ -139,7 +139,7 @@ namespace
installed_repo->add_version("cat", replacing_pkg_name, "1")->set_slot(SlotName("1"));
installed_repo->add_version("cat", replacing_pkg_name, "2")->set_slot(SlotName("2"));
installed_repo->add_version("cat", replacing_pkg_name, "3")->set_slot(SlotName("3"));
- env.package_database()->add_repository(2, installed_repo);
+ env.add_repository(2, installed_repo);
const std::shared_ptr<const PackageIDSequence> rlist(env[selection::AllVersionsSorted(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec(replacing, &env, { })),
diff --git a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
index 19861d100..366a7522b 100644
--- a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
+++ b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
@@ -117,7 +117,7 @@ namespace test_cases
keys->insert("root", stringify(FSPath(stringify(FSPath::cwd() / "e_repository_TEST_symlink_rewriting_dir" / "root")).realpath()));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
keys = std::make_shared<Map<std::string, std::string>>();
keys->insert("format", "vdb");
@@ -128,7 +128,7 @@ namespace test_cases
keys->insert("root", stringify(FSPath(stringify(FSPath::cwd() / "e_repository_TEST_symlink_rewriting_dir" / "root")).realpath()));
std::shared_ptr<Repository> installed_repo(VDBRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, installed_repo);
+ env.add_repository(1, installed_repo);
InstallAction action(make_named_values<InstallActionOptions>(
n::destination() = installed_repo,
diff --git a/paludis/repositories/e/e_repository_params.hh b/paludis/repositories/e/e_repository_params.hh
index a5dc7ded9..7c3c368c4 100644
--- a/paludis/repositories/e/e_repository_params.hh
+++ b/paludis/repositories/e/e_repository_params.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -34,7 +34,6 @@
namespace paludis
{
class Environment;
- class PackageDatabase;
class ERepository;
typedef Sequence<std::shared_ptr<const ERepository> > ERepositorySequence;
diff --git a/paludis/repositories/e/e_repository_sets_TEST.cc b/paludis/repositories/e/e_repository_sets_TEST.cc
index ca7aabaa5..a32a2a112 100644
--- a/paludis/repositories/e/e_repository_sets_TEST.cc
+++ b/paludis/repositories/e/e_repository_sets_TEST.cc
@@ -26,6 +26,7 @@
#include <paludis/util/map.hh>
#include <paludis/util/set.hh>
#include <paludis/util/make_named_values.hh>
+#include <paludis/util/join.hh>
#include <paludis/unformatted_pretty_printer.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
@@ -63,7 +64,7 @@ namespace test_cases
keys->insert("profiles", "e_repository_sets_TEST_dir/repo1/profiles/profile");
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const SetNameSet> sets_list(env.set_names());
TEST_CHECK_EQUAL(join(sets_list->begin(), sets_list->end(), " "), "everything insecurity "
@@ -99,8 +100,8 @@ namespace test_cases
n::supports_uninstall() = true
)));
installed->add_version("cat-two", "bar", "1.5");
- env.package_database()->add_repository(0, installed);
- env.package_database()->add_repository(1, repo);
+ env.add_repository(0, installed);
+ env.add_repository(1, repo);
std::shared_ptr<const SetSpecTree> set1(env.set(SetName("set1::test-repo-1")));
TEST_CHECK(bool(set1));
@@ -131,7 +132,7 @@ namespace test_cases
keys->insert("profiles", "e_repository_sets_TEST_dir/repo1/profiles/profile");
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const SetSpecTree> insecurity(env.set(SetName("insecurity::test-repo-1")));
UnformattedPrettyPrinter ff;
@@ -162,7 +163,7 @@ namespace test_cases
keys->insert("profiles", "e_repository_sets_TEST_dir/repo1/profiles/profile");
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<FakeInstalledRepository> installed(std::make_shared<FakeInstalledRepository>(
make_named_values<FakeInstalledRepositoryParams>(
n::environment() = &env,
@@ -175,7 +176,7 @@ namespace test_cases
installed->add_version("cat-three", "baz", "1.0");
installed->add_version("cat-four", "xyzzy", "1.1.0")->set_slot(SlotName("1"));
installed->add_version("cat-four", "xyzzy", "2.0.1")->set_slot(SlotName("2"));
- env.package_database()->add_repository(0, installed);
+ env.add_repository(0, installed);
std::shared_ptr<const SetSpecTree> security(env.set(SetName("security::test-repo-1")));
UnformattedPrettyPrinter ff;
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 11b7bc648..377b6fb49 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -511,7 +511,7 @@ EbuildMetadataCommand::load(const std::shared_ptr<const EbuildID> & id)
id->set_eapi(s);
else
{
- auto repo(params.environment()->package_database()->fetch_repository(id->repository_name()));
+ auto repo(params.environment()->fetch_repository(id->repository_name()));
auto e_repo(std::static_pointer_cast<const ERepository>(repo));
id->set_eapi(e_repo->params().eapi_when_unspecified());
}
diff --git a/paludis/repositories/e/ebuild.hh b/paludis/repositories/e/ebuild.hh
index 538399bee..57259c34d 100644
--- a/paludis/repositories/e/ebuild.hh
+++ b/paludis/repositories/e/ebuild.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -23,10 +23,18 @@
#include <paludis/util/attributes.hh>
#include <paludis/util/map-fwd.hh>
#include <paludis/util/process-fwd.hh>
-#include <paludis/package_database.hh>
+#include <paludis/util/named_value.hh>
+#include <paludis/util/fs_path.hh>
+
#include <paludis/action-fwd.hh>
#include <paludis/fs_merger-fwd.hh>
+#include <paludis/output_manager-fwd.hh>
+#include <paludis/repository-fwd.hh>
+#include <paludis/package_id-fwd.hh>
+#include <paludis/merger.hh>
+
#include <string>
+#include <memory>
/** \file
* Declarations for the EbuildCommand classes.
diff --git a/paludis/repositories/e/ebuild_flat_metadata_cache.cc b/paludis/repositories/e/ebuild_flat_metadata_cache.cc
index 538ad6e00..b3bfa68f4 100644
--- a/paludis/repositories/e/ebuild_flat_metadata_cache.cc
+++ b/paludis/repositories/e/ebuild_flat_metadata_cache.cc
@@ -18,7 +18,11 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "ebuild_flat_metadata_cache.hh"
+#include <paludis/repositories/e/ebuild_flat_metadata_cache.hh>
+#include <paludis/repositories/e/dep_parser.hh>
+#include <paludis/repositories/e/eapi.hh>
+#include <paludis/repositories/e/spec_tree_pretty_printer.hh>
+
#include <paludis/util/log.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/join.hh>
@@ -30,13 +34,12 @@
#include <paludis/util/timestamp.hh>
#include <paludis/util/fs_stat.hh>
#include <paludis/util/fs_error.hh>
-#include <paludis/repositories/e/dep_parser.hh>
-#include <paludis/repositories/e/eapi.hh>
-#include <paludis/repositories/e/spec_tree_pretty_printer.hh>
#include <paludis/util/pimp-impl.hh>
+
#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
#include <paludis/unformatted_pretty_printer.hh>
+#include <paludis/repository.hh>
+
#include <set>
#include <map>
#include <list>
@@ -131,7 +134,7 @@ namespace
{
std::set<std::string> tokens;
tokenise_whitespace(lines[m.inherited()->flat_list_index()], std::inserter(tokens, tokens.begin()));
- auto repo(_imp->env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(_imp->env->fetch_repository(id->repository_name()));
FSPath eclassdir((repo->location_key()->value() / "eclass").realpath_if_exists());
for (std::set<std::string>::const_iterator it(tokens.begin()),
it_end(tokens.end()); it_end != it; ++it)
@@ -399,7 +402,7 @@ EbuildFlatMetadataCache::load(const std::shared_ptr<const EbuildID> & id, const
{
std::vector<std::string> eclasses;
tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(keys["_eclasses_"], "\t", "", std::back_inserter(eclasses));
- auto repo(_imp->env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(_imp->env->fetch_repository(id->repository_name()));
FSPath eclassdir((repo->location_key()->value() / "eclass").realpath_if_exists());
for (std::vector<std::string>::const_iterator it(eclasses.begin()),
it_end(eclasses.end()); it_end != it; ++it)
diff --git a/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc b/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
index ba6763fd5..f05eeba55 100644
--- a/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
+++ b/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
@@ -35,6 +35,7 @@
#include <paludis/util/timestamp.hh>
#include <paludis/util/fs_stat.hh>
#include <paludis/util/make_null_shared_ptr.hh>
+#include <paludis/util/join.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
#include <iterator>
@@ -73,7 +74,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-1",
@@ -100,7 +101,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-stale-1",
@@ -128,7 +129,7 @@ namespace test_cases
keys->insert("eapi_when_unknown", "1");
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-guessed-eapi-1",
@@ -155,7 +156,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-1",
@@ -185,7 +186,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-stale-1",
@@ -212,7 +213,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-wrong-1",
@@ -239,7 +240,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-gone-1",
@@ -266,7 +267,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-detection-1",
@@ -293,7 +294,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-1",
@@ -321,7 +322,7 @@ namespace test_cases
keys->insert("eapi_when_unknown", "1");
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-guessed-eapi-1",
@@ -348,7 +349,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-guessed-eapi-extension-1",
@@ -375,7 +376,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-guessed-eapi-1",
@@ -402,7 +403,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-empty-1",
@@ -430,7 +431,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-stale-1",
@@ -457,7 +458,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-mtime-1",
@@ -484,7 +485,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-mtime-stale-1",
@@ -511,7 +512,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-bad-mtime-1",
@@ -538,7 +539,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-eapi-1",
@@ -565,7 +566,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-duplicate-key-1",
@@ -592,7 +593,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-1",
@@ -622,7 +623,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-stale-1",
@@ -649,7 +650,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-wrong-1",
@@ -675,7 +676,7 @@ namespace test_cases
keys->insert("eclassdirs", "ebuild_flat_metadata_cache_TEST_dir/repo/eclass ebuild_flat_metadata_cache_TEST_dir/extra_eclasses");
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-gone-1",
@@ -702,7 +703,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-1",
@@ -732,7 +733,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-nonstandard-1",
@@ -762,7 +763,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-stale-1",
@@ -789,7 +790,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-wrong-1",
@@ -816,7 +817,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-gone-1",
@@ -843,7 +844,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-truncated-1",
@@ -877,7 +878,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-bad-mtime-1",
@@ -904,7 +905,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-spaces-1",
@@ -932,7 +933,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-1",
@@ -963,7 +964,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-percat-1",
@@ -994,7 +995,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-stale-1",
@@ -1022,7 +1023,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-wrong-1",
@@ -1050,7 +1051,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-gone-1",
@@ -1078,7 +1079,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-truncated-1",
@@ -1113,7 +1114,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-bad-mtime-1",
@@ -1141,7 +1142,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-spaces-1",
@@ -1175,7 +1176,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/write-1",
@@ -1210,7 +1211,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/write-eapi1-1",
@@ -1247,7 +1248,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/write-eclasses-1",
@@ -1283,7 +1284,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "ebuild_flat_metadata_cache_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/write-exlibs-1",
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 775edecab..6e776da37 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -67,6 +67,7 @@
#include <paludis/util/singleton-impl.hh>
#include <paludis/util/accept_visitor.hh>
#include <paludis/util/fs_stat.hh>
+#include <paludis/util/join.hh>
#include <set>
#include <iterator>
@@ -207,7 +208,7 @@ namespace
{
if (! g.empty())
return g;
- auto repo(env->package_database()->fetch_repository(repo_name));
+ auto repo(env->fetch_repository(repo_name));
auto e_repo(std::static_pointer_cast<const ERepository>(repo));
return e_repo->params().eapi_when_unknown();
}
@@ -242,7 +243,7 @@ EbuildID::need_keys_added() const
add_metadata_key(_imp->fs_location);
- auto repo(_imp->environment->package_database()->fetch_repository(repository_name()));
+ auto repo(_imp->environment->fetch_repository(repository_name()));
auto e_repo(std::static_pointer_cast<const ERepository>(repo));
FSPath cache_file(e_repo->params().cache());
cache_file /= stringify(name().category());
@@ -526,7 +527,7 @@ EbuildID::need_masks_added() const
return;
}
- auto repo(_imp->environment->package_database()->fetch_repository(_imp->repository_name));
+ auto repo(_imp->environment->fetch_repository(_imp->repository_name));
auto e_repo(std::static_pointer_cast<const ERepository>(repo));
if (keywords_key())
@@ -1230,7 +1231,7 @@ namespace
void visit(InstallAction & a)
{
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
auto e_repo(std::static_pointer_cast<const ERepository>(repo));
do_install_action(
env,
@@ -1241,7 +1242,7 @@ namespace
void visit(FetchAction & a)
{
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
auto e_repo(std::static_pointer_cast<const ERepository>(repo));
do_fetch_action(
env,
@@ -1252,7 +1253,7 @@ namespace
void visit(PretendFetchAction & a)
{
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
auto e_repo(std::static_pointer_cast<const ERepository>(repo));
do_pretend_fetch_action(
env,
@@ -1263,7 +1264,7 @@ namespace
void visit(PretendAction & action)
{
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
auto e_repo(std::static_pointer_cast<const ERepository>(repo));
if (! do_pretend_action(
env,
@@ -1275,7 +1276,7 @@ namespace
void visit(InfoAction & action)
{
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
auto e_repo(std::static_pointer_cast<const ERepository>(repo));
do_info_action(
env,
@@ -1428,7 +1429,7 @@ EbuildID::make_choice_value(
if (! eapi()->supported())
throw InternalError(PALUDIS_HERE, "Unsupported EAPI");
- auto repo(_imp->environment->package_database()->fetch_repository(repository_name()));
+ auto repo(_imp->environment->fetch_repository(repository_name()));
auto e_repo(std::static_pointer_cast<const ERepository>(repo));
std::string name_with_prefix_s;
@@ -1625,7 +1626,7 @@ EbuildID::add_build_options(const std::shared_ptr<Choices> & choices) const
void
EbuildID::purge_invalid_cache() const
{
- auto repo(_imp->environment->package_database()->fetch_repository(repository_name()));
+ auto repo(_imp->environment->fetch_repository(repository_name()));
auto e_repo(std::static_pointer_cast<const ERepository>(repo));
FSPath write_cache_file(e_repo->params().write_cache());
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index 5179914a2..1fd3e090a 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -46,7 +46,6 @@
#include <paludis/choice.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/package_id.hh>
-#include <paludis/package_database.hh>
#include <unordered_map>
#include <functional>
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 9177c0e9a..57b62e9a8 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -24,6 +24,7 @@
#include <paludis/repositories/e/eapi_phase.hh>
#include <paludis/repositories/e/extra_distribution_data.hh>
#include <paludis/repositories/e/can_skip_phase.hh>
+
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/log.hh>
#include <paludis/util/sequence.hh>
@@ -37,6 +38,8 @@
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/util/fs_stat.hh>
#include <paludis/util/fs_iterator.hh>
+#include <paludis/util/join.hh>
+
#include <paludis/output_manager.hh>
#include <paludis/distribution.hh>
#include <paludis/environment.hh>
@@ -47,6 +50,7 @@
#include <paludis/package_id.hh>
#include <paludis/action.hh>
#include <paludis/literal_metadata_key.hh>
+
#include <functional>
using namespace paludis;
diff --git a/paludis/repositories/e/exndbam_repository_TEST.cc b/paludis/repositories/e/exndbam_repository_TEST.cc
index 21e6836ee..a96534669 100644
--- a/paludis/repositories/e/exndbam_repository_TEST.cc
+++ b/paludis/repositories/e/exndbam_repository_TEST.cc
@@ -140,7 +140,7 @@ namespace test_cases
keys->insert("root", stringify(FSPath("exndbam_repository_TEST_dir/root").realpath()));
std::shared_ptr<Repository> repo1(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo1);
+ env.add_repository(1, repo1);
keys = std::make_shared<Map<std::string, std::string>>();
keys->insert("format", "exndbam");
@@ -149,7 +149,7 @@ namespace test_cases
keys->insert("root", stringify(FSPath("exndbam_repository_TEST_dir/root").realpath()));
std::shared_ptr<Repository> exndbam_repo(ExndbamRepository::ExndbamRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(0, exndbam_repo);
+ env.add_repository(0, exndbam_repo);
TEST_CHECK(exndbam_repo->package_ids(QualifiedPackageName("cat/pkg"), { })->empty());
diff --git a/paludis/repositories/e/fetch_visitor.cc b/paludis/repositories/e/fetch_visitor.cc
index 387c413f7..9296084b6 100644
--- a/paludis/repositories/e/fetch_visitor.cc
+++ b/paludis/repositories/e/fetch_visitor.cc
@@ -30,7 +30,6 @@
#include <paludis/repository.hh>
#include <paludis/about.hh>
#include <paludis/output_manager.hh>
-#include <paludis/package_database.hh>
#include <paludis/util/system.hh>
#include <paludis/util/process.hh>
@@ -163,7 +162,7 @@ FetchVisitor::visit(const FetchableURISpecTree::NodeType<FetchableURIDepSpec>::T
if (! *_imp->labels.begin())
throw ActionFailedError("No fetch action label available");
- auto repo(_imp->env->package_database()->fetch_repository(_imp->id->repository_name()));
+ auto repo(_imp->env->fetch_repository(_imp->id->repository_name()));
SourceURIFinder source_uri_finder(_imp->env, repo.get(),
node.spec()->original_url(), node.spec()->filename(), _imp->mirrors_name, _imp->get_mirrors_fn);
(*_imp->labels.begin())->accept(source_uri_finder);
diff --git a/paludis/repositories/e/fetch_visitor_TEST.cc b/paludis/repositories/e/fetch_visitor_TEST.cc
index 16d47907b..061919974 100644
--- a/paludis/repositories/e/fetch_visitor_TEST.cc
+++ b/paludis/repositories/e/fetch_visitor_TEST.cc
@@ -29,7 +29,6 @@
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/standard_output_manager.hh>
#include <paludis/util/safe_ifstream.hh>
-#include <paludis/package_database.hh>
#include <paludis/user_dep_spec.hh>
#include <paludis/generator.hh>
#include <paludis/filter.hh>
@@ -70,7 +69,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
TEST_CHECK(FSPath("fetch_visitor_TEST_dir/in/input1").stat().exists());
diff --git a/paludis/repositories/e/fix_locked_dependencies.cc b/paludis/repositories/e/fix_locked_dependencies.cc
index e312277a5..bb613609b 100644
--- a/paludis/repositories/e/fix_locked_dependencies.cc
+++ b/paludis/repositories/e/fix_locked_dependencies.cc
@@ -27,7 +27,6 @@
#include <paludis/util/accept_visitor.hh>
#include <paludis/dep_spec.hh>
#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
#include <paludis/package_id.hh>
#include <paludis/elike_slot_requirement.hh>
#include <paludis/selection.hh>
diff --git a/paludis/repositories/e/fix_locked_dependencies_TEST.cc b/paludis/repositories/e/fix_locked_dependencies_TEST.cc
index 4c1ed3e23..74f8a1a06 100644
--- a/paludis/repositories/e/fix_locked_dependencies_TEST.cc
+++ b/paludis/repositories/e/fix_locked_dependencies_TEST.cc
@@ -26,7 +26,6 @@
#include <paludis/repositories/fake/fake_installed_repository.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/make_named_values.hh>
-#include <paludis/package_database.hh>
#include <paludis/unformatted_pretty_printer.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
@@ -48,7 +47,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
std::shared_ptr<FakeInstalledRepository> installed_repo(std::make_shared<FakeInstalledRepository>(
@@ -58,7 +57,7 @@ namespace test_cases
n::suitable_destination() = true,
n::supports_uninstall() = true
)));
- env.package_database()->add_repository(2, installed_repo);
+ env.add_repository(2, installed_repo);
installed_repo->add_version("cat", "installed", "1")->set_slot(SlotName("monkey"));
std::shared_ptr<const EAPI> eapi(EAPIData::get_instance()->eapi_from_string("paludis-1"));
diff --git a/paludis/repositories/e/parse_dependency_label.cc b/paludis/repositories/e/parse_dependency_label.cc
index 9c55b968b..0cb185772 100644
--- a/paludis/repositories/e/parse_dependency_label.cc
+++ b/paludis/repositories/e/parse_dependency_label.cc
@@ -20,17 +20,20 @@
#include <paludis/repositories/e/parse_dependency_label.hh>
#include <paludis/repositories/e/dep_parser.hh>
#include <paludis/repositories/e/eapi.hh>
+
#include <paludis/util/log.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/singleton-impl.hh>
+
#include <paludis/dep_label.hh>
#include <paludis/choice.hh>
#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
#include <paludis/package_id.hh>
#include <paludis/metadata_key.hh>
#include <paludis/always_enabled_dependency_label.hh>
+#include <paludis/repository.hh>
+
#include <map>
#include <set>
@@ -45,7 +48,7 @@ namespace
const std::string label,
const ChoiceNameWithPrefix n)
{
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (repo->installed_root_key())
return false;
diff --git a/paludis/repositories/e/pipe_command_handler.cc b/paludis/repositories/e/pipe_command_handler.cc
index a8e86d69c..c8754ecdf 100644
--- a/paludis/repositories/e/pipe_command_handler.cc
+++ b/paludis/repositories/e/pipe_command_handler.cc
@@ -24,6 +24,7 @@
#include <paludis/repositories/e/dep_parser.hh>
#include <paludis/repositories/e/spec_tree_pretty_printer.hh>
#include <paludis/repositories/e/e_repository_id.hh>
+
#include <paludis/util/log.hh>
#include <paludis/util/join.hh>
#include <paludis/util/exception.hh>
@@ -37,10 +38,10 @@
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/accept_visitor.hh>
#include <paludis/util/save.hh>
+
#include <paludis/output_manager.hh>
#include <paludis/package_id.hh>
#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
#include <paludis/metadata_key.hh>
#include <paludis/selection.hh>
#include <paludis/generator.hh>
@@ -49,6 +50,9 @@
#include <paludis/choice.hh>
#include <paludis/dep_spec_annotations.hh>
#include <paludis/unformatted_pretty_printer.hh>
+#include <paludis/version_spec.hh>
+#include <paludis/repository.hh>
+
#include <vector>
#include <limits>
#include <sstream>
@@ -432,9 +436,9 @@ paludis::erepository::pipe_command_handler(const Environment * const environment
}
else
{
- if (! environment->package_database()->has_repository_named(RepositoryName("installed")))
+ if (! environment->has_repository_named(RepositoryName("installed")))
return "Eno installed repository available";
- std::shared_ptr<const Repository> repo(environment->package_database()->fetch_repository(RepositoryName("installed")));
+ std::shared_ptr<const Repository> repo(environment->fetch_repository(RepositoryName("installed")));
Repository::MetadataConstIterator key(repo->find_metadata("location"));
if (repo->end_metadata() == key)
return "Einstalled repository has no location key";
diff --git a/paludis/repositories/e/source_uri_finder_TEST.cc b/paludis/repositories/e/source_uri_finder_TEST.cc
index 93326819d..693a875bf 100644
--- a/paludis/repositories/e/source_uri_finder_TEST.cc
+++ b/paludis/repositories/e/source_uri_finder_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -23,7 +23,6 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/sequence.hh>
-#include <paludis/package_database.hh>
#include <test/test_runner.hh>
#include <test/test_framework.hh>
@@ -58,7 +57,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
SourceURIFinder f(&env, repo.get(), "http://example.com/path/input", "output", "monkey",
get_mirrors_fn);
@@ -88,7 +87,7 @@ namespace test_cases
n::environment() = &env,
n::name() = RepositoryName("repo")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
SourceURIFinder f(&env, repo.get(), "mirror://example/path/input", "output", "repo", get_mirrors_fn);
URIMirrorsThenListedLabel label("mirrors-then-listed");
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index 95f90f92d..6917db02f 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -44,7 +44,6 @@
#include <paludis/util/deferred_construction_ptr.hh>
#include <paludis/package_id.hh>
-#include <paludis/package_database.hh>
#include <paludis/choice.hh>
#include <paludis/literal_metadata_key.hh>
diff --git a/paludis/repositories/e/vdb_merger.cc b/paludis/repositories/e/vdb_merger.cc
index 0bba3f871..b67d3b081 100644
--- a/paludis/repositories/e/vdb_merger.cc
+++ b/paludis/repositories/e/vdb_merger.cc
@@ -36,14 +36,14 @@
#include <paludis/util/safe_ofstream.hh>
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/env_var_names.hh>
+#include <paludis/util/md5.hh>
#include <paludis/output_manager.hh>
#include <paludis/hook.hh>
#include <paludis/package_id.hh>
-#include <paludis/util/md5.hh>
#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
#include <paludis/metadata_key.hh>
+#include <paludis/version_spec.hh>
#include <iomanip>
#include <list>
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index efc673faa..bef18331e 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -40,7 +40,6 @@
#include <paludis/hook.hh>
#include <paludis/match_package.hh>
#include <paludis/metadata_key.hh>
-#include <paludis/package_database.hh>
#include <paludis/package_id.hh>
#include <paludis/repositories/e/ebuild.hh>
#include <paludis/repository_name_cache.hh>
@@ -78,6 +77,7 @@
#include <paludis/util/destringify.hh>
#include <paludis/util/fs_stat.hh>
#include <paludis/util/fs_iterator.hh>
+#include <paludis/util/join.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/create_iterator-impl.hh>
@@ -1360,8 +1360,8 @@ VDBRepository::perform_updates()
std::cout << std::endl << "Checking for updates (package moves etc):" << std::endl;
std::map<FSPath, std::time_t, FSPathComparator> update_timestamps;
- for (PackageDatabase::RepositoryConstIterator r(_imp->params.environment()->package_database()->begin_repositories()),
- r_end(_imp->params.environment()->package_database()->end_repositories()) ;
+ for (auto r(_imp->params.environment()->begin_repositories()),
+ r_end(_imp->params.environment()->end_repositories()) ;
r != r_end ; ++r)
{
Context context_2("When performing updates from '" + stringify((*r)->name()) + "':");
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index 5d08251c6..4580f73a6 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -21,7 +21,6 @@
#include <paludis/repositories/e/e_repository.hh>
#include <paludis/repositories/e/spec_tree_pretty_printer.hh>
#include <paludis/environments/test/test_environment.hh>
-#include <paludis/package_database.hh>
#include <paludis/metadata_key.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/options.hh>
@@ -30,6 +29,7 @@
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/fs_iterator.hh>
#include <paludis/util/fs_stat.hh>
+#include <paludis/util/join.hh>
#include <paludis/standard_output_manager.hh>
#include <paludis/generator.hh>
#include <paludis/filter.hh>
@@ -40,6 +40,7 @@
#include <paludis/action.hh>
#include <paludis/choice.hh>
#include <paludis/unformatted_pretty_printer.hh>
+#include <paludis/contents.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/make_null_shared_ptr.hh>
@@ -146,7 +147,7 @@ namespace test_cases
keys->insert("builddir", stringify(FSPath::cwd() / "vdb_repository_TEST_dir" / "build"));
std::shared_ptr<Repository> repo(VDBRepository::VDBRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> e1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
@@ -216,7 +217,7 @@ namespace test_cases
keys->insert("world", stringify(FSPath::cwd() / "vdb_repository_TEST_dir" / "world-no-match-no-eol"));
std::shared_ptr<Repository> repo(VDBRepository::VDBRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<const PackageID> e1(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
@@ -285,7 +286,7 @@ namespace test_cases
keys->insert("root", stringify(FSPath("vdb_repository_TEST_dir/root").realpath()));
std::shared_ptr<Repository> repo1(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo1);
+ env.add_repository(1, repo1);
keys = std::make_shared<Map<std::string, std::string>>();
keys->insert("format", "e");
@@ -301,7 +302,7 @@ namespace test_cases
keys->insert("root", stringify(FSPath("vdb_repository_TEST_dir/root").realpath()));
std::shared_ptr<Repository> repo2(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(2, repo2);
+ env.add_repository(2, repo2);
keys = std::make_shared<Map<std::string, std::string>>();
keys->insert("format", "vdb");
@@ -312,7 +313,7 @@ namespace test_cases
keys->insert("root", stringify(FSPath("vdb_repository_TEST_dir/root").realpath()));
std::shared_ptr<Repository> vdb_repo(VDBRepository::VDBRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(0, vdb_repo);
+ env.add_repository(0, vdb_repo);
InstallAction install_action(make_named_values<InstallActionOptions>(
n::destination() = vdb_repo,
@@ -415,7 +416,7 @@ namespace test_cases
keys->insert("root", stringify(FSPath("vdb_repository_TEST_dir/root").realpath()));
std::shared_ptr<Repository> repo1(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo1);
+ env.add_repository(1, repo1);
keys = std::make_shared<Map<std::string, std::string>>();
keys->insert("format", "vdb");
@@ -426,7 +427,7 @@ namespace test_cases
keys->insert("root", stringify(FSPath("vdb_repository_TEST_dir/root").realpath()));
std::shared_ptr<Repository> vdb_repo(VDBRepository::VDBRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(0, vdb_repo);
+ env.add_repository(0, vdb_repo);
TEST_CHECK(vdb_repo->package_ids(QualifiedPackageName("cat/pkg"), { })->empty());
diff --git a/paludis/repositories/e/vdb_repository_TEST_cache.cc b/paludis/repositories/e/vdb_repository_TEST_cache.cc
index 89cab6119..21dff2867 100644
--- a/paludis/repositories/e/vdb_repository_TEST_cache.cc
+++ b/paludis/repositories/e/vdb_repository_TEST_cache.cc
@@ -21,7 +21,6 @@
#include <paludis/repositories/e/e_repository.hh>
#include <paludis/repositories/e/spec_tree_pretty_printer.hh>
#include <paludis/environments/test/test_environment.hh>
-#include <paludis/package_database.hh>
#include <paludis/metadata_key.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/options.hh>
@@ -149,7 +148,7 @@ namespace test_cases
keys->insert("root", stringify(FSPath("vdb_repository_TEST_cache_dir/root").realpath()));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
keys = std::make_shared<Map<std::string, std::string>>();
keys->insert("format", "vdb");
@@ -160,7 +159,7 @@ namespace test_cases
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.package_database()->add_repository(0, vdb_repo);
+ env.add_repository(0, vdb_repo);
UninstallAction uninstall_action(make_named_values<UninstallActionOptions>(
n::config_protect() = "",
@@ -393,7 +392,7 @@ namespace test_cases
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.package_database()->add_repository(0, vdb_repo);
+ env.add_repository(0, vdb_repo);
TEST_CHECK(! provides_cache.stat().exists());
@@ -514,7 +513,7 @@ namespace test_cases
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.package_database()->add_repository(1, repo1);
+ env.add_repository(1, repo1);
keys = std::make_shared<Map<std::string, std::string>>();
keys->insert("format", "e");
@@ -530,7 +529,7 @@ namespace test_cases
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.package_database()->add_repository(2, repo2);
+ env.add_repository(2, repo2);
keys = std::make_shared<Map<std::string, std::string>>();
keys->insert("format", "vdb");
@@ -541,7 +540,7 @@ namespace test_cases
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.package_database()->add_repository(0, vdb_repo);
+ env.add_repository(0, vdb_repo);
UninstallAction uninstall_action(make_named_values<UninstallActionOptions>(
n::config_protect() = "",
diff --git a/paludis/repositories/e/vdb_repository_TEST_eapis.cc b/paludis/repositories/e/vdb_repository_TEST_eapis.cc
index 9ae972402..9a42781c2 100644
--- a/paludis/repositories/e/vdb_repository_TEST_eapis.cc
+++ b/paludis/repositories/e/vdb_repository_TEST_eapis.cc
@@ -21,7 +21,6 @@
#include <paludis/repositories/e/e_repository.hh>
#include <paludis/repositories/e/spec_tree_pretty_printer.hh>
#include <paludis/environments/test/test_environment.hh>
-#include <paludis/package_database.hh>
#include <paludis/metadata_key.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/options.hh>
@@ -127,7 +126,7 @@ namespace test_cases
keys->insert("root", stringify(FSPath("vdb_repository_TEST_eapis_dir/root").realpath()));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
keys = std::make_shared<Map<std::string, std::string>>();
keys->insert("format", "vdb");
@@ -138,7 +137,7 @@ namespace test_cases
keys->insert("root", stringify(FSPath("vdb_repository_TEST_eapis_dir/root").realpath()));
std::shared_ptr<Repository> vdb_repo(VDBRepository::VDBRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(0, vdb_repo);
+ env.add_repository(0, vdb_repo);
InstallAction install_action(make_named_values<InstallActionOptions>(
n::destination() = vdb_repo,
@@ -256,7 +255,7 @@ namespace test_cases
keys->insert("root", stringify(FSPath("vdb_repository_TEST_eapis_dir/root").realpath()));
std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
keys = std::make_shared<Map<std::string, std::string>>();
keys->insert("format", "vdb");
@@ -267,7 +266,7 @@ namespace test_cases
keys->insert("root", stringify(FSPath("vdb_repository_TEST_eapis_dir/root").realpath()));
std::shared_ptr<Repository> vdb_repo(VDBRepository::VDBRepository::repository_factory_create(&env,
std::bind(from_keys, keys, std::placeholders::_1)));
- env.package_database()->add_repository(0, vdb_repo);
+ env.add_repository(0, vdb_repo);
InstallAction install_action(make_named_values<InstallActionOptions>(
n::destination() = vdb_repo,
diff --git a/paludis/repositories/e/vdb_unmerger.cc b/paludis/repositories/e/vdb_unmerger.cc
index 631d1f25b..e9ed59c7a 100644
--- a/paludis/repositories/e/vdb_unmerger.cc
+++ b/paludis/repositories/e/vdb_unmerger.cc
@@ -18,16 +18,12 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "vdb_unmerger.hh"
-#include "vdb_contents_tokeniser.hh"
+#include <paludis/repositories/e/vdb_unmerger.hh>
+#include <paludis/repositories/e/vdb_contents_tokeniser.hh>
#include <paludis/util/destringify.hh>
#include <paludis/util/md5.hh>
-#include <paludis/environment.hh>
-#include <paludis/hook.hh>
-#include <paludis/package_database.hh>
-#include <paludis/package_id.hh>
-#include <paludis/metadata_key.hh>
+#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/join.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/log.hh>
@@ -41,8 +37,13 @@
#include <paludis/util/timestamp.hh>
#include <paludis/util/fs_stat.hh>
#include <paludis/util/fs_iterator.hh>
+
+#include <paludis/environment.hh>
+#include <paludis/hook.hh>
+#include <paludis/package_id.hh>
+#include <paludis/metadata_key.hh>
+#include <paludis/contents.hh>
#include <paludis/output_manager.hh>
-#include <paludis/util/safe_ifstream.hh>
#include <list>
#include <map>
diff --git a/paludis/repositories/e/vdb_unmerger_TEST.cc b/paludis/repositories/e/vdb_unmerger_TEST.cc
index b6c331895..9b534721c 100644
--- a/paludis/repositories/e/vdb_unmerger_TEST.cc
+++ b/paludis/repositories/e/vdb_unmerger_TEST.cc
@@ -29,7 +29,6 @@
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/standard_output_manager.hh>
#include <paludis/user_dep_spec.hh>
-#include <paludis/package_database.hh>
#include <paludis/generator.hh>
#include <paludis/selection.hh>
#include <paludis/filtered_generator.hh>
@@ -120,7 +119,7 @@ namespace
keys->insert("location", stringify(FSPath::cwd() / "vdb_unmerger_TEST_dir" / "repo"));
keys->insert("builddir", stringify(FSPath::cwd() / "vdb_unmerger_TEST_dir" / "build"));
repo = VDBRepository::repository_factory_create(&env, std::bind(from_keys, keys, std::placeholders::_1));
- env.package_database()->add_repository(0, repo);
+ env.add_repository(0, repo);
unmerger = std::make_shared<VDBUnmergerNoDisplay>(make_named_values<VDBUnmergerOptions>(
n::config_protect() = "/protected_file /protected_dir",
diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc
index ed1691af5..9789db4c0 100644
--- a/paludis/repositories/fake/fake_package_id.cc
+++ b/paludis/repositories/fake/fake_package_id.cc
@@ -20,6 +20,7 @@
#include <paludis/repositories/fake/fake_package_id.hh>
#include <paludis/repositories/fake/fake_repository_base.hh>
#include <paludis/repositories/fake/dep_parser.hh>
+
#include <paludis/name.hh>
#include <paludis/action.hh>
#include <paludis/environment.hh>
@@ -28,10 +29,10 @@
#include <paludis/dep_spec.hh>
#include <paludis/choice.hh>
#include <paludis/user_dep_spec.hh>
-#include <paludis/package_database.hh>
#include <paludis/always_enabled_dependency_label.hh>
#include <paludis/pretty_printer.hh>
#include <paludis/call_pretty_printer.hh>
+
#include <paludis/util/stringify.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/pimp-impl.hh>
@@ -48,6 +49,8 @@
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/accept_visitor.hh>
#include <paludis/util/singleton-impl.hh>
+#include <paludis/util/join.hh>
+
#include <map>
#include <list>
#include <sstream>
@@ -982,7 +985,7 @@ FakePackageID::extra_hash_value() const
bool
FakePackageID::supports_action(const SupportsActionTestBase & b) const
{
- auto repo(_imp->env->package_database()->fetch_repository(repository_name()));
+ auto repo(_imp->env->fetch_repository(repository_name()));
return repo->some_ids_might_support_action(b);
}
@@ -1103,7 +1106,7 @@ namespace
void visit(const InstallAction & a)
{
SupportsActionTest<InstallAction> t;
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (! repo->some_ids_might_support_action(t))
throw ActionFailedError("Unsupported action: " + a.simple_name());
}
@@ -1111,7 +1114,7 @@ namespace
void visit(const UninstallAction & a)
{
SupportsActionTest<UninstallAction> t;
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (! repo->some_ids_might_support_action(t))
throw ActionFailedError("Unsupported action: " + a.simple_name());
}
@@ -1119,7 +1122,7 @@ namespace
void visit(const FetchAction & a)
{
SupportsActionTest<FetchAction> t;
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (! repo->some_ids_might_support_action(t))
throw ActionFailedError("Unsupported action: " + a.simple_name());
}
@@ -1127,7 +1130,7 @@ namespace
void visit(const ConfigAction & a)
{
SupportsActionTest<ConfigAction> t;
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (! repo->some_ids_might_support_action(t))
throw ActionFailedError("Unsupported action: " + a.simple_name());
}
@@ -1135,7 +1138,7 @@ namespace
void visit(const InfoAction & a)
{
SupportsActionTest<InfoAction> t;
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (! repo->some_ids_might_support_action(t))
throw ActionFailedError("Unsupported action: " + a.simple_name());
}
@@ -1143,7 +1146,7 @@ namespace
void visit(const PretendAction & a)
{
SupportsActionTest<PretendAction> t;
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (! repo->some_ids_might_support_action(t))
throw ActionFailedError("Unsupported action: " + a.simple_name());
}
@@ -1151,7 +1154,7 @@ namespace
void visit(const PretendFetchAction & a)
{
SupportsActionTest<PretendFetchAction> t;
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (! repo->some_ids_might_support_action(t))
throw ActionFailedError("Unsupported action: " + a.simple_name());
}
diff --git a/paludis/repositories/gemcutter/gemcutter_repository_store.cc b/paludis/repositories/gemcutter/gemcutter_repository_store.cc
index 61852fdb2..61a2a6578 100644
--- a/paludis/repositories/gemcutter/gemcutter_repository_store.cc
+++ b/paludis/repositories/gemcutter/gemcutter_repository_store.cc
@@ -34,7 +34,6 @@
#include <paludis/version_spec.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
#include <functional>
#include <unordered_map>
#include <algorithm>
diff --git a/paludis/repositories/repository/repository_repository.cc b/paludis/repositories/repository/repository_repository.cc
index dd842bbda..00a5e83a6 100644
--- a/paludis/repositories/repository/repository_repository.cc
+++ b/paludis/repositories/repository/repository_repository.cc
@@ -38,7 +38,6 @@
#include <paludis/package_id.hh>
#include <paludis/output_manager.hh>
#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
#include <list>
using namespace paludis;
@@ -336,7 +335,7 @@ RepositoryRepository::sync_host_key() const
bool
RepositoryRepository::is_suitable_destination_for(const std::shared_ptr<const PackageID> & id) const
{
- auto repo(_imp->params.environment()->package_database()->fetch_repository(id->repository_name()));
+ auto repo(_imp->params.environment()->fetch_repository(id->repository_name()));
std::string f(repo->format_key() ? repo->format_key()->value() : "");
return f == "unavailable";
}
diff --git a/paludis/repositories/repository/repository_repository_store.cc b/paludis/repositories/repository/repository_repository_store.cc
index dfc1c164b..a2b59a174 100644
--- a/paludis/repositories/repository/repository_repository_store.cc
+++ b/paludis/repositories/repository/repository_repository_store.cc
@@ -32,7 +32,6 @@
#include <paludis/version_spec.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
#include <functional>
#include <unordered_map>
#include <algorithm>
@@ -84,8 +83,7 @@ RepositoryRepositoryStore::~RepositoryRepositoryStore()
void
RepositoryRepositoryStore::_populate()
{
- for (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
- r_end(_imp->env->package_database()->end_repositories()) ; r != r_end ; ++r)
+ for (auto r(_imp->env->begin_repositories()), r_end(_imp->env->end_repositories()) ; r != r_end ; ++r)
_populate_one((*r)->name());
}
diff --git a/paludis/repositories/unavailable/unavailable_repository_TEST.cc b/paludis/repositories/unavailable/unavailable_repository_TEST.cc
index 5b78e7863..4e00c07e1 100644
--- a/paludis/repositories/unavailable/unavailable_repository_TEST.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_TEST.cc
@@ -34,7 +34,6 @@
#include <paludis/filtered_generator.hh>
#include <paludis/filter.hh>
#include <paludis/package_id.hh>
-#include <paludis/package_database.hh>
#include <memory>
@@ -54,7 +53,7 @@ TEST(UnavailableRepository, Creation)
n::sync() = std::make_shared<Map<std::string, std::string> >(),
n::sync_options() = std::make_shared<Map<std::string, std::string> >()
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
EXPECT_EQ("unavailable", stringify(repo->name()));
}
@@ -69,7 +68,7 @@ TEST(UnavailableRepository, Contents)
n::sync() = std::make_shared<Map<std::string, std::string> >(),
n::sync_options() = std::make_shared<Map<std::string, std::string> >()
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
EXPECT_EQ("unavailable", stringify(repo->name()));
std::shared_ptr<const PackageIDSequence> contents(
@@ -95,7 +94,7 @@ TEST(UnavailableRepository, Contents)
n::environment() = &env,
n::name() = RepositoryName("bar")
)));
- env.package_database()->add_repository(2, hide_bar);
+ env.add_repository(2, hide_bar);
repo->invalidate();
std::shared_ptr<const PackageIDSequence> contents_without_bar(
diff --git a/paludis/repositories/unavailable/unavailable_repository_store.cc b/paludis/repositories/unavailable/unavailable_repository_store.cc
index 85e9ffdf6..bd3df3c28 100644
--- a/paludis/repositories/unavailable/unavailable_repository_store.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_store.cc
@@ -38,7 +38,6 @@
#include <paludis/version_spec.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
#include <functional>
#include <unordered_map>
#include <algorithm>
@@ -108,7 +107,7 @@ UnavailableRepositoryStore::_populate_one(const Environment * const env, const F
UnavailableRepositoryFile file(f);
- bool has_repo(env->package_database()->has_repository_named(RepositoryName(file.repo_name())));
+ bool has_repo(env->has_repository_named(RepositoryName(file.repo_name())));
if (! _imp->seen_repo_names.insert(file.repo_name()).second)
{
diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc
index 29d0edd29..e59cc6f41 100644
--- a/paludis/repositories/unpackaged/installed_id.cc
+++ b/paludis/repositories/unpackaged/installed_id.cc
@@ -19,8 +19,7 @@
#include <paludis/repositories/unpackaged/installed_id.hh>
#include <paludis/repositories/unpackaged/installed_repository.hh>
-#include <paludis/ndbam.hh>
-#include <paludis/ndbam_unmerger.hh>
+
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/system.hh>
#include <paludis/util/stringify.hh>
@@ -35,10 +34,13 @@
#include <paludis/util/singleton-impl.hh>
#include <paludis/util/fs_iterator.hh>
#include <paludis/util/fs_stat.hh>
+#include <paludis/util/join.hh>
+
+#include <paludis/ndbam.hh>
+#include <paludis/ndbam_unmerger.hh>
#include <paludis/output_manager.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
-#include <paludis/package_database.hh>
#include <paludis/contents.hh>
#include <paludis/environment.hh>
#include <paludis/metadata_key.hh>
@@ -50,6 +52,7 @@
#include <paludis/always_enabled_dependency_label.hh>
#include <paludis/pretty_printer.hh>
#include <paludis/call_pretty_printer.hh>
+
#include <functional>
using namespace paludis;
@@ -825,7 +828,7 @@ InstalledUnpackagedID::uninstall(const bool replace,
{
Context context("When uninstalling '" + stringify(*this) + "':");
- auto repo(_imp->env->package_database()->fetch_repository(repository_name()));
+ auto repo(_imp->env->fetch_repository(repository_name()));
bool last((! replace) && (! if_for_install_id));
if (last)
{
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index 14cc03232..252c20c90 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -47,7 +47,6 @@
#include <paludis/selection.hh>
#include <paludis/hook.hh>
#include <paludis/common_sets.hh>
-#include <paludis/package_database.hh>
#include <paludis/unformatted_pretty_printer.hh>
#include <sstream>
#include <sys/time.h>
@@ -273,7 +272,7 @@ InstalledUnpackagedRepository::merge(const MergeParams & m)
if (! is_suitable_destination_for(m.package_id()))
throw ActionFailedError("Not a suitable destination for '" + stringify(*m.package_id()) + "'");
- auto repo(_imp->params.environment()->package_database()->fetch_repository(m.package_id()->repository_name()));
+ auto repo(_imp->params.environment()->fetch_repository(m.package_id()->repository_name()));
FSPath install_under("/");
{
Repository::MetadataConstIterator k(repo->find_metadata("install_under"));
@@ -402,7 +401,7 @@ InstalledUnpackagedRepository::merge(const MergeParams & m)
bool
InstalledUnpackagedRepository::is_suitable_destination_for(const std::shared_ptr<const PackageID> & id) const
{
- auto repo(_imp->params.environment()->package_database()->fetch_repository(id->repository_name()));
+ auto repo(_imp->params.environment()->fetch_repository(id->repository_name()));
std::string f(repo->format_key() ? repo->format_key()->value() : "");
return f == "unpackaged";
}
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc
index 9dc5b0cce..31e3c5540 100644
--- a/paludis/repositories/unpackaged/installed_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc
@@ -22,7 +22,6 @@
#include <paludis/environments/test/test_environment.hh>
-#include <paludis/package_database.hh>
#include <paludis/package_id.hh>
#include <paludis/action.hh>
#include <paludis/user_dep_spec.hh>
@@ -32,6 +31,7 @@
#include <paludis/filtered_generator.hh>
#include <paludis/selection.hh>
#include <paludis/standard_output_manager.hh>
+#include <paludis/contents.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/join.hh>
@@ -108,7 +108,7 @@ TEST(InstalledRepository, Content)
n::location() = FSPath("installed_repository_TEST_dir/repo1"),
n::root() = FSPath("installed_repository_TEST_dir/root")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageIDSequence> ids(
env[selection::AllVersionsSorted(generator::All())]);
@@ -126,7 +126,7 @@ TEST(InstalledRepository, Metadata)
n::location() = FSPath("installed_repository_TEST_dir/repo1"),
n::root() = FSPath("installed_repository_TEST_dir/root")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(
generator::Matches(parse_user_package_dep_spec("cat-one/foo:0",
@@ -173,7 +173,7 @@ TEST(InstalledRepository, Masks)
n::location() = FSPath("installed_repository_TEST_dir/repo1"),
n::root() = FSPath("installed_repository_TEST_dir/root")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id1(*env[selection::RequireExactlyOne(
generator::Matches(parse_user_package_dep_spec("cat-one/foo:0",
@@ -198,7 +198,7 @@ TEST(InstalledRepository, Actions)
n::location() = FSPath("installed_repository_TEST_dir/repo1"),
n::root() = FSPath("installed_repository_TEST_dir/root")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
EXPECT_TRUE(! repo->some_ids_might_support_action(SupportsActionTest<InstallAction>()));
EXPECT_TRUE(! repo->some_ids_might_support_action(SupportsActionTest<ConfigAction>()));
@@ -228,7 +228,7 @@ TEST(InstalledRepository, UninstallLast)
n::location() = FSPath("installed_repository_TEST_dir/repo2"),
n::root() = FSPath("installed_repository_TEST_dir/root2")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(generator::All())]);
EXPECT_EQ("cat-one/foo-1.2.3:fred::installed-unpackaged",
@@ -275,7 +275,7 @@ TEST(InstalledRepository, UninstallNotLast)
n::location() = FSPath("installed_repository_TEST_dir/repo3"),
n::root() = FSPath("installed_repository_TEST_dir/root3")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(generator::All())]);
EXPECT_EQ("cat-one/foo-1.2.3:fred::installed-unpackaged cat-one/foo-3.2.1:barney::installed-unpackaged",
@@ -318,7 +318,7 @@ TEST(InstalledRepository, MultipleOps)
n::location() = FSPath("installed_repository_TEST_dir/repo4"),
n::root() = FSPath("installed_repository_TEST_dir/root4")
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(generator::All())]);
EXPECT_EQ("", join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "));
@@ -335,7 +335,7 @@ TEST(InstalledRepository, MultipleOps)
n::location() = FSPath("installed_repository_TEST_dir/repo4"),
n::root() = FSPath("installed_repository_TEST_dir/root4")
)));
- env.package_database()->add_repository(0, repo);
+ env.add_repository(0, repo);
std::shared_ptr<Repository> source_repo(std::make_shared<UnpackagedRepository>(
RepositoryName("unpackaged"),
@@ -353,7 +353,7 @@ TEST(InstalledRepository, MultipleOps)
n::strip() = indeterminate,
n::version() = VersionSpec("1.0", { })
)));
- env.package_database()->add_repository(1, source_repo);
+ env.add_repository(1, source_repo);
{
const std::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
@@ -393,7 +393,7 @@ TEST(InstalledRepository, MultipleOps)
n::location() = FSPath("installed_repository_TEST_dir/repo4"),
n::root() = FSPath("installed_repository_TEST_dir/root4")
)));
- env.package_database()->add_repository(0, repo);
+ env.add_repository(0, repo);
std::shared_ptr<Repository> source_repo(std::make_shared<UnpackagedRepository>(
RepositoryName("unpackaged"),
@@ -411,7 +411,7 @@ TEST(InstalledRepository, MultipleOps)
n::strip() = indeterminate,
n::version() = VersionSpec("1.0", { })
)));
- env.package_database()->add_repository(1, source_repo);
+ env.add_repository(1, source_repo);
{
const std::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
@@ -453,7 +453,7 @@ TEST(InstalledRepository, MultipleOps)
n::location() = FSPath("installed_repository_TEST_dir/repo4"),
n::root() = FSPath("installed_repository_TEST_dir/root4")
)));
- env.package_database()->add_repository(0, repo);
+ env.add_repository(0, repo);
std::shared_ptr<Repository> source_repo(std::make_shared<UnpackagedRepository>(
RepositoryName("unpackaged"),
@@ -471,7 +471,7 @@ TEST(InstalledRepository, MultipleOps)
n::strip() = indeterminate,
n::version() = VersionSpec("1.0", { })
)));
- env.package_database()->add_repository(1, source_repo);
+ env.add_repository(1, source_repo);
{
const std::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
@@ -513,7 +513,7 @@ TEST(InstalledRepository, MultipleOps)
n::location() = FSPath("installed_repository_TEST_dir/repo4"),
n::root() = FSPath("installed_repository_TEST_dir/root4")
)));
- env.package_database()->add_repository(0, repo);
+ env.add_repository(0, repo);
{
const std::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
@@ -557,7 +557,7 @@ TEST(InstalledRepository, MultipleOps)
n::location() = FSPath("installed_repository_TEST_dir/repo4"),
n::root() = FSPath("installed_repository_TEST_dir/root4")
)));
- env.package_database()->add_repository(0, repo);
+ env.add_repository(0, repo);
{
const std::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc
index 379782192..1eb637f00 100644
--- a/paludis/repositories/unpackaged/unpackaged_id.cc
+++ b/paludis/repositories/unpackaged/unpackaged_id.cc
@@ -20,6 +20,7 @@
#include <paludis/repositories/unpackaged/unpackaged_id.hh>
#include <paludis/repositories/unpackaged/unpackaged_key.hh>
#include <paludis/repositories/unpackaged/unpackaged_stripper.hh>
+
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/visitor_cast.hh>
@@ -30,10 +31,11 @@
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/util/fs_stat.hh>
#include <paludis/util/singleton-impl.hh>
+#include <paludis/util/timestamp.hh>
+
#include <paludis/output_manager.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
-#include <paludis/package_database.hh>
#include <paludis/environment.hh>
#include <paludis/metadata_key.hh>
#include <paludis/action.hh>
@@ -42,6 +44,7 @@
#include <paludis/elike_choices.hh>
#include <paludis/user_dep_spec.hh>
#include <paludis/always_enabled_dependency_label.hh>
+#include <paludis/repository.hh>
using namespace paludis;
using namespace paludis::unpackaged_repositories;
diff --git a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
index 0d89315c9..86d09db83 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
@@ -22,7 +22,6 @@
#include <paludis/environments/test/test_environment.hh>
-#include <paludis/package_database.hh>
#include <paludis/package_id.hh>
#include <paludis/action.hh>
#include <paludis/metadata_key.hh>
@@ -85,7 +84,7 @@ TEST(UnpackagedRepository, Members)
n::strip() = indeterminate,
n::version() = VersionSpec("1.0", { })
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageIDSequence> ids(
env[selection::AllVersionsSorted(generator::All())]);
@@ -111,7 +110,7 @@ TEST(UnpackagedRepository, Metadata)
n::strip() = indeterminate,
n::version() = VersionSpec("1.0", { })
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id(
*env[selection::RequireExactlyOne(generator::All())]->begin());
@@ -143,7 +142,7 @@ TEST(UnpackagedRepository, Masks)
n::strip() = indeterminate,
n::version() = VersionSpec("1.0", { })
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
const std::shared_ptr<const PackageID> id(
*env[selection::RequireExactlyOne(generator::All())]->begin());
@@ -170,7 +169,7 @@ TEST(UnpackagedRepository, Actions)
n::strip() = indeterminate,
n::version() = VersionSpec("1.0", { })
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
EXPECT_TRUE(repo->some_ids_might_support_action(SupportsActionTest<InstallAction>()));
EXPECT_TRUE(! repo->some_ids_might_support_action(SupportsActionTest<ConfigAction>()));
@@ -208,7 +207,7 @@ TEST(UnpackagedRepository, Install)
n::strip() = indeterminate,
n::version() = VersionSpec("1.0", { })
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<Repository> installed_repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
@@ -217,7 +216,7 @@ TEST(UnpackagedRepository, Install)
n::location() = FSPath("unpackaged_repository_TEST_dir/installed"),
n::root() = FSPath("unpackaged_repository_TEST_dir/root")
)));
- env.package_database()->add_repository(0, installed_repo);
+ env.add_repository(0, installed_repo);
EXPECT_TRUE(! FSPath("unpackaged_repository_TEST_dir/root/first").stat().is_regular_file());
@@ -256,7 +255,7 @@ TEST(UnpackagedRepository, InstallUnder)
n::strip() = indeterminate,
n::version() = VersionSpec("1.0", { })
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
std::shared_ptr<Repository> installed_repo(std::make_shared<InstalledUnpackagedRepository>(
RepositoryName("installed-unpackaged"),
@@ -265,7 +264,7 @@ TEST(UnpackagedRepository, InstallUnder)
n::location() = FSPath("unpackaged_repository_TEST_dir/under_installed"),
n::root() = FSPath("unpackaged_repository_TEST_dir/under_root")
)));
- env.package_database()->add_repository(0, installed_repo);
+ env.add_repository(0, installed_repo);
EXPECT_TRUE(! FSPath("unpackaged_repository_TEST_dir/under_root/magic/pixie/first").stat().is_regular_file());
diff --git a/paludis/repositories/unwritten/unwritten_repository_TEST.cc b/paludis/repositories/unwritten/unwritten_repository_TEST.cc
index 0df4c719b..019ed700b 100644
--- a/paludis/repositories/unwritten/unwritten_repository_TEST.cc
+++ b/paludis/repositories/unwritten/unwritten_repository_TEST.cc
@@ -34,7 +34,6 @@
#include <paludis/filter.hh>
#include <paludis/package_id.hh>
#include <paludis/metadata_key.hh>
-#include <paludis/package_database.hh>
#include <memory>
@@ -62,7 +61,7 @@ TEST(UnwrittenRepository, Creation)
n::sync() = std::make_shared<Map<std::string, std::string> >(),
n::sync_options() = std::make_shared<Map<std::string, std::string> >()
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
EXPECT_EQ("unwritten", stringify(repo->name()));
}
@@ -77,7 +76,7 @@ TEST(UnwrittenRepository, Contents)
n::sync() = std::make_shared<Map<std::string, std::string> >(),
n::sync_options() = std::make_shared<Map<std::string, std::string> >()
)));
- env.package_database()->add_repository(1, repo);
+ env.add_repository(1, repo);
EXPECT_EQ("unwritten", stringify(repo->name()));
std::shared_ptr<const PackageIDSequence> contents(
diff --git a/paludis/repositories/unwritten/unwritten_repository_store.cc b/paludis/repositories/unwritten/unwritten_repository_store.cc
index 2626d7c09..03ccd29e1 100644
--- a/paludis/repositories/unwritten/unwritten_repository_store.cc
+++ b/paludis/repositories/unwritten/unwritten_repository_store.cc
@@ -37,7 +37,6 @@
#include <paludis/version_spec.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
#include <functional>
#include <unordered_map>
#include <algorithm>
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index 7d017a428..88ee2a538 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -22,9 +22,9 @@
#include <paludis/environment.hh>
#include <paludis/hook.hh>
-#include <paludis/package_database.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/action.hh>
+
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/set.hh>
@@ -35,6 +35,7 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/util/make_null_shared_ptr.hh>
+#include <paludis/util/stringify.hh>
#include <functional>
#include <unordered_map>
@@ -137,8 +138,8 @@ InstalledVirtualsRepository::need_ids() const
/* 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 (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
- r_end(_imp->env->package_database()->end_repositories()) ; r != r_end ; ++r)
+ for (auto r(_imp->env->begin_repositories()),
+ r_end(_imp->env->end_repositories()) ; r != r_end ; ++r)
{
if (! (**r).provides_interface())
continue;
@@ -353,7 +354,7 @@ InstalledVirtualsRepository::repository_factory_dependencies(
bool
InstalledVirtualsRepository::is_suitable_destination_for(const std::shared_ptr<const PackageID> & id) const
{
- auto repo(_imp->env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(_imp->env->fetch_repository(id->repository_name()));
std::string f(repo->format_key() ? repo->format_key()->value() : "");
return f == "virtuals";
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index dcad0e4b6..a2231e576 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -36,7 +36,6 @@
#include <paludis/metadata_key.hh>
#include <paludis/action.hh>
#include <paludis/mask.hh>
-#include <paludis/package_database.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/user_dep_spec.hh>
#include <paludis/selection.hh>
@@ -387,7 +386,7 @@ namespace
void visit(const InstallAction & a)
{
SupportsActionTest<InstallAction> t;
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (! repo->some_ids_might_support_action(t))
throw ActionFailedError("Unsupported action: " + a.simple_name());
}
@@ -395,7 +394,7 @@ namespace
void visit(const UninstallAction & a)
{
SupportsActionTest<UninstallAction> t;
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (! repo->some_ids_might_support_action(t))
throw ActionFailedError("Unsupported action: " + a.simple_name());
}
@@ -403,7 +402,7 @@ namespace
void visit(const ConfigAction & a)
{
SupportsActionTest<ConfigAction> t;
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (! repo->some_ids_might_support_action(t))
throw ActionFailedError("Unsupported action: " + a.simple_name());
}
@@ -411,7 +410,7 @@ namespace
void visit(const FetchAction & a)
{
SupportsActionTest<FetchAction> t;
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (! repo->some_ids_might_support_action(t))
throw ActionFailedError("Unsupported action: " + a.simple_name());
}
@@ -419,7 +418,7 @@ namespace
void visit(const InfoAction & a)
{
SupportsActionTest<InfoAction> t;
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (! repo->some_ids_might_support_action(t))
throw ActionFailedError("Unsupported action: " + a.simple_name());
}
@@ -427,7 +426,7 @@ namespace
void visit(const PretendAction & a)
{
SupportsActionTest<PretendAction> t;
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (! repo->some_ids_might_support_action(t))
throw ActionFailedError("Unsupported action: " + a.simple_name());
}
@@ -435,7 +434,7 @@ namespace
void visit(const PretendFetchAction & a)
{
SupportsActionTest<PretendFetchAction> t;
- auto repo(env->package_database()->fetch_repository(id->repository_name()));
+ auto repo(env->fetch_repository(id->repository_name()));
if (! repo->some_ids_might_support_action(t))
throw ActionFailedError("Unsupported action: " + a.simple_name());
}
@@ -452,7 +451,7 @@ VirtualsPackageID::perform_action(Action & a) const
bool
VirtualsPackageID::supports_action(const SupportsActionTestBase & b) const
{
- auto repo(_imp->env->package_database()->fetch_repository(repository_name()));
+ auto repo(_imp->env->fetch_repository(repository_name()));
return repo->some_ids_might_support_action(b);
}
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index bb6026d91..1aa80ccf4 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -22,7 +22,6 @@
#include <paludis/environment.hh>
#include <paludis/match_package.hh>
-#include <paludis/package_database.hh>
#include <paludis/action.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/selection.hh>
@@ -151,8 +150,7 @@ 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 (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
- r_end(_imp->env->package_database()->end_repositories()) ; r != r_end ; ++r)
+ for (auto r(_imp->env->begin_repositories()), r_end(_imp->env->end_repositories()) ; r != r_end ; ++r)
{
if (! (**r).provides_interface())
continue;
@@ -170,8 +168,7 @@ VirtualsRepository::need_names() const
std::vector<std::pair<QualifiedPackageName, std::shared_ptr<const PackageDepSpec> > > new_names;
- for (PackageDatabase::RepositoryConstIterator r(_imp->env->package_database()->begin_repositories()),
- r_end(_imp->env->package_database()->end_repositories()) ; r != r_end ; ++r)
+ for (auto r(_imp->env->begin_repositories()), r_end(_imp->env->end_repositories()) ; r != r_end ; ++r)
{
if (! (**r).virtuals_interface())
continue;
diff --git a/paludis/repositories/virtuals/virtuals_repository_TEST.cc b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
index e38d4a4f7..529fb40e8 100644
--- a/paludis/repositories/virtuals/virtuals_repository_TEST.cc
+++ b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
@@ -25,7 +25,6 @@
#include <paludis/environments/test/test_environment.hh>
-#include <paludis/package_database.hh>
#include <paludis/generator.hh>
#include <paludis/filter.hh>
#include <paludis/filtered_generator.hh>
@@ -37,6 +36,7 @@
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/options.hh>
#include <paludis/util/make_named_values.hh>
+#include <paludis/util/join.hh>
#include <gtest/gtest.h>
@@ -60,9 +60,9 @@ TEST(VirtualsRepository, Works)
ASSERT_TRUE(repo->virtuals_interface());
- env.package_database()->add_repository(2, virtuals);
- env.package_database()->add_repository(3, repo);
- env.package_database()->add_repository(4, installed);
+ env.add_repository(2, virtuals);
+ env.add_repository(3, repo);
+ env.add_repository(4, installed);
repo->add_version("cat", "pkg", "1")->provide_key()->set_from_string("virtual/pkg");
repo->add_version("cat", "pkg", "2")->provide_key()->set_from_string("virtual/pkg");
@@ -100,10 +100,10 @@ TEST(VirtualsRepository, Duplicates)
n::supports_uninstall() = true
)));
- env.package_database()->add_repository(2, virtuals);
- env.package_database()->add_repository(3, repo1);
- env.package_database()->add_repository(4, repo2);
- env.package_database()->add_repository(5, installed);
+ env.add_repository(2, virtuals);
+ env.add_repository(3, repo1);
+ env.add_repository(4, repo2);
+ env.add_repository(5, installed);
repo1->add_version("cat", "pkg", "1")->provide_key()->set_from_string("virtual/pkg");
repo1->add_version("cat", "pkg", "2")->provide_key()->set_from_string("virtual/pkg");
@@ -141,9 +141,9 @@ TEST(VirtualsRepository, Recursion)
n::name() = RepositoryName("repo2")
)));
- env.package_database()->add_repository(2, repo1);
- env.package_database()->add_repository(3, repo2);
- env.package_database()->add_repository(4, virtuals);
+ env.add_repository(2, repo1);
+ env.add_repository(3, repo2);
+ env.add_repository(4, virtuals);
repo1->add_version("virtual", "gkp", "1")->provide_key()->set_from_string("virtual/pkg");
repo1->add_virtual_package(QualifiedPackageName("virtual/pkg"), std::make_shared<PackageDepSpec>(