aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-08-27 22:10:46 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-08-27 22:10:46 +0100
commitafc70958528f85092b4278bc09dcbc8584221a05 (patch)
treef85f2fee71c6c9efa7b9d53fd2e97c7acdf14ae1
parent07219185f96f934756b321aff77229a42c37fda4 (diff)
downloadpaludis-afc70958528f85092b4278bc09dcbc8584221a05.tar.gz
paludis-afc70958528f85092b4278bc09dcbc8584221a05.tar.xz
Repository ctor now takes Environment param
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc32
-rw-r--r--paludis/repositories/cran/cran_repository.cc32
-rw-r--r--paludis/repositories/e/e_installed_repository.cc2
-rw-r--r--paludis/repositories/e/e_repository.cc34
-rw-r--r--paludis/repositories/e/extra_distribution_data.cc20
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc2
-rw-r--r--paludis/repositories/gems/gems_repository.cc2
-rw-r--r--paludis/repositories/gems/installed_gems_repository.cc3
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.cc1
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc2
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.cc2
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc2
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc2
-rw-r--r--paludis/repository.cc1
-rw-r--r--paludis/repository.hh2
15 files changed, 74 insertions, 65 deletions
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index bc71d8c..e29806a 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -157,22 +157,24 @@ Implementation<CRANInstalledRepository>::need_ids() const
#endif
CRANInstalledRepository::CRANInstalledRepository(const CRANInstalledRepositoryParams & p) :
- Repository(RepositoryName("installed-cran"),
+ Repository(
+ p.environment,
+ RepositoryName("installed-cran"),
make_named_values<RepositoryCapabilities>(
- value_for<n::destination_interface>(this),
- value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
- value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
- value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
- value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
- value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
- value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::qa_interface>(static_cast<RepositoryQAInterface *>(0)),
- value_for<n::sets_interface>(this),
- value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
- value_for<n::use_interface>(static_cast<RepositoryUseInterface *>(0)),
- value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
- )),
+ value_for<n::destination_interface>(this),
+ value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
+ value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
+ value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
+ value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
+ value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
+ value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
+ value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
+ value_for<n::qa_interface>(static_cast<RepositoryQAInterface *>(0)),
+ value_for<n::sets_interface>(this),
+ value_for<n::syncable_interface>(static_cast<RepositorySyncableInterface *>(0)),
+ value_for<n::use_interface>(static_cast<RepositoryUseInterface *>(0)),
+ value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
+ )),
PrivateImplementationPattern<CRANInstalledRepository>(new Implementation<CRANInstalledRepository>(p)),
_imp(PrivateImplementationPattern<CRANInstalledRepository>::_imp)
{
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index 2fdf4d3..9d68758 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -102,22 +102,24 @@ Implementation<CRANRepository>::~Implementation()
CRANRepository::CRANRepository(const CRANRepositoryParams & p) :
- Repository(CRANRepository::fetch_repo_name(stringify(p.location)),
+ Repository(
+ p.environment,
+ CRANRepository::fetch_repo_name(stringify(p.location)),
make_named_values<RepositoryCapabilities>(
- value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
- value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
- value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
- value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
- value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
- value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
- value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
- value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
- value_for<n::qa_interface>(static_cast<RepositoryQAInterface *>(0)),
- value_for<n::sets_interface>(this),
- value_for<n::syncable_interface>(this),
- value_for<n::use_interface>(static_cast<RepositoryUseInterface *>(0)),
- value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
- )),
+ value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
+ value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
+ value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
+ value_for<n::hook_interface>(static_cast<RepositoryHookInterface *>(0)),
+ value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
+ value_for<n::manifest_interface>(static_cast<RepositoryManifestInterface *>(0)),
+ value_for<n::mirrors_interface>(static_cast<RepositoryMirrorsInterface *>(0)),
+ value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
+ value_for<n::qa_interface>(static_cast<RepositoryQAInterface *>(0)),
+ value_for<n::sets_interface>(this),
+ value_for<n::syncable_interface>(this),
+ value_for<n::use_interface>(static_cast<RepositoryUseInterface *>(0)),
+ value_for<n::virtuals_interface>(static_cast<RepositoryVirtualsInterface *>(0))
+ )),
PrivateImplementationPattern<CRANRepository>(new Implementation<CRANRepository>(p, make_shared_ptr(new Mutex))),
_imp(PrivateImplementationPattern<CRANRepository>::_imp)
{
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index 0b62a6e..4e7b2d1 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -68,7 +68,7 @@ namespace paludis
EInstalledRepository::EInstalledRepository(const EInstalledRepositoryParams & p,
const RepositoryName & n, const RepositoryCapabilities & c) :
- Repository(n, c),
+ Repository(p.environment, n, c),
PrivateImplementationPattern<EInstalledRepository>(new Implementation<EInstalledRepository>(p)),
_imp(PrivateImplementationPattern<EInstalledRepository>::_imp)
{
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 837c76c..8bb76db 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -452,26 +452,28 @@ namespace
}
ERepository::ERepository(const ERepositoryParams & p) :
- Repository(fetch_repo_name(p.location),
+ Repository(
+ p.environment,
+ fetch_repo_name(p.location),
make_named_values<RepositoryCapabilities>(
- value_for<n::destination_interface>(p.binary_destination ? this : 0),
- value_for<n::e_interface>(this),
- value_for<n::environment_variable_interface>(this),
- value_for<n::hook_interface>(this),
- value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
- value_for<n::manifest_interface>(this),
- value_for<n::mirrors_interface>(this),
- value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
+ value_for<n::destination_interface>(p.binary_destination ? this : 0),
+ value_for<n::e_interface>(this),
+ value_for<n::environment_variable_interface>(this),
+ value_for<n::hook_interface>(this),
+ value_for<n::make_virtuals_interface>(static_cast<RepositoryMakeVirtualsInterface *>(0)),
+ value_for<n::manifest_interface>(this),
+ value_for<n::mirrors_interface>(this),
+ value_for<n::provides_interface>(static_cast<RepositoryProvidesInterface *>(0)),
#ifdef ENABLE_QA
- value_for<n::qa_interface>(this),
+ value_for<n::qa_interface>(this),
#else
- value_for<n::qa_interface>(static_cast<RepositoryQAInterface *>(0)),
+ value_for<n::qa_interface>(static_cast<RepositoryQAInterface *>(0)),
#endif
- value_for<n::sets_interface>(this),
- value_for<n::syncable_interface>(this),
- value_for<n::use_interface>(this),
- value_for<n::virtuals_interface>((*DistributionData::get_instance()->distribution_from_string(p.environment->distribution())).support_old_style_virtuals() ? this : 0)
- )),
+ value_for<n::sets_interface>(this),
+ value_for<n::syncable_interface>(this),
+ value_for<n::use_interface>(this),
+ value_for<n::virtuals_interface>((*DistributionData::get_instance()->distribution_from_string(p.environment->distribution())).support_old_style_virtuals() ? this : 0)
+ )),
PrivateImplementationPattern<ERepository>(new Implementation<ERepository>(this, p)),
_imp(PrivateImplementationPattern<ERepository>::_imp)
{
diff --git a/paludis/repositories/e/extra_distribution_data.cc b/paludis/repositories/e/extra_distribution_data.cc
index 6e2e086..917924b 100644
--- a/paludis/repositories/e/extra_distribution_data.cc
+++ b/paludis/repositories/e/extra_distribution_data.cc
@@ -35,18 +35,18 @@ namespace paludis
return "e.conf";
}
- static std::tr1::shared_ptr<EDistribution> make_data(const KeyValueConfigFile & k)
+ static std::tr1::shared_ptr<EDistribution> make_data(const std::tr1::shared_ptr<const KeyValueConfigFile> & k)
{
return make_shared_ptr(new EDistribution(make_named_values<EDistribution>(
- value_for<n::default_buildroot>(k.get("default_buildroot")),
- value_for<n::default_distdir>(k.get("default_distdir")),
- value_for<n::default_eapi_when_unknown>(k.get("default_eapi_when_unknown")),
- value_for<n::default_eapi_when_unspecified>(k.get("default_eapi_when_unspecified")),
- value_for<n::default_layout>(k.get("default_layout")),
- value_for<n::default_names_cache>(k.get("default_names_cache")),
- value_for<n::default_profile_eapi>(k.get("default_profile_eapi")),
- value_for<n::default_provides_cache>(k.get("default_provides_cache")),
- value_for<n::default_write_cache>(k.get("default_write_cache"))
+ value_for<n::default_buildroot>(k->get("default_buildroot")),
+ value_for<n::default_distdir>(k->get("default_distdir")),
+ value_for<n::default_eapi_when_unknown>(k->get("default_eapi_when_unknown")),
+ value_for<n::default_eapi_when_unspecified>(k->get("default_eapi_when_unspecified")),
+ value_for<n::default_layout>(k->get("default_layout")),
+ value_for<n::default_names_cache>(k->get("default_names_cache")),
+ value_for<n::default_profile_eapi>(k->get("default_profile_eapi")),
+ value_for<n::default_provides_cache>(k->get("default_provides_cache")),
+ value_for<n::default_write_cache>(k->get("default_write_cache"))
)));
}
};
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index b12bff8..7f28754 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -63,7 +63,7 @@ namespace paludis
FakeRepositoryBase::FakeRepositoryBase(const Environment * const e,
const RepositoryName & our_name, const RepositoryCapabilities & caps) :
- Repository(our_name, caps),
+ Repository(e, our_name, caps),
RepositoryUseInterface(),
PrivateImplementationPattern<FakeRepositoryBase>(new Implementation<FakeRepositoryBase>(e)),
_imp(PrivateImplementationPattern<FakeRepositoryBase>::_imp)
diff --git a/paludis/repositories/gems/gems_repository.cc b/paludis/repositories/gems/gems_repository.cc
index 6ab1d3c..72330f6 100644
--- a/paludis/repositories/gems/gems_repository.cc
+++ b/paludis/repositories/gems/gems_repository.cc
@@ -90,7 +90,7 @@ namespace paludis
}
GemsRepository::GemsRepository(const gems::RepositoryParams & params) :
- Repository(RepositoryName("gems"),
+ Repository(params.environment, RepositoryName("gems"),
make_named_values<RepositoryCapabilities>(
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
diff --git a/paludis/repositories/gems/installed_gems_repository.cc b/paludis/repositories/gems/installed_gems_repository.cc
index d24b0df..621db56 100644
--- a/paludis/repositories/gems/installed_gems_repository.cc
+++ b/paludis/repositories/gems/installed_gems_repository.cc
@@ -89,7 +89,8 @@ namespace paludis
}
InstalledGemsRepository::InstalledGemsRepository(const gems::InstalledRepositoryParams & params) :
- Repository(RepositoryName("installed-gems"),
+ Repository(params.environment,
+ RepositoryName("installed-gems"),
make_named_values<RepositoryCapabilities>(
value_for<n::destination_interface>(this),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
diff --git a/paludis/repositories/unavailable/unavailable_repository.cc b/paludis/repositories/unavailable/unavailable_repository.cc
index bf3b624..1410f46 100644
--- a/paludis/repositories/unavailable/unavailable_repository.cc
+++ b/paludis/repositories/unavailable/unavailable_repository.cc
@@ -83,6 +83,7 @@ UnavailableRepositoryConfigurationError::UnavailableRepositoryConfigurationError
UnavailableRepository::UnavailableRepository(const UnavailableRepositoryParams & p) :
PrivateImplementationPattern<UnavailableRepository>(new Implementation<UnavailableRepository>(this, p)),
Repository(
+ p.environment(),
p.name(),
make_named_values<RepositoryCapabilities>(
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index cc4148c..b7f601b 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -85,7 +85,7 @@ namespace paludis
InstalledUnpackagedRepository::InstalledUnpackagedRepository(
const RepositoryName & n, const InstalledUnpackagedRepositoryParams & p) :
PrivateImplementationPattern<InstalledUnpackagedRepository>(new Implementation<InstalledUnpackagedRepository>(p)),
- Repository(n, make_named_values<RepositoryCapabilities>(
+ Repository(p.environment, n, make_named_values<RepositoryCapabilities>(
value_for<n::destination_interface>(this),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc
index afcd1cf..e4ea89c 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository.cc
@@ -93,7 +93,7 @@ namespace paludis
UnpackagedRepository::UnpackagedRepository(const RepositoryName & n,
const UnpackagedRepositoryParams & params) :
PrivateImplementationPattern<UnpackagedRepository>(new Implementation<UnpackagedRepository>(n, params)),
- Repository(n, make_named_values<RepositoryCapabilities>(
+ Repository(params.environment(), n, make_named_values<RepositoryCapabilities>(
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index f485d30..08d49ec 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -108,7 +108,7 @@ namespace
InstalledVirtualsRepository::InstalledVirtualsRepository(const Environment * const env,
const FSEntry & r) :
- Repository(RepositoryName(make_name(r)), make_named_values<RepositoryCapabilities>(
+ Repository(env, RepositoryName(make_name(r)), make_named_values<RepositoryCapabilities>(
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index b1521d3..92db22c 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -118,7 +118,7 @@ namespace
}
VirtualsRepository::VirtualsRepository(const Environment * const env) :
- Repository(RepositoryName("virtuals"), make_named_values<RepositoryCapabilities>(
+ Repository(env, RepositoryName("virtuals"), make_named_values<RepositoryCapabilities>(
value_for<n::destination_interface>(static_cast<RepositoryDestinationInterface *>(0)),
value_for<n::e_interface>(static_cast<RepositoryEInterface *>(0)),
value_for<n::environment_variable_interface>(static_cast<RepositoryEnvironmentVariableInterface *>(0)),
diff --git a/paludis/repository.cc b/paludis/repository.cc
index 4a12b56..aa306e1 100644
--- a/paludis/repository.cc
+++ b/paludis/repository.cc
@@ -110,6 +110,7 @@ namespace paludis
}
Repository::Repository(
+ const Environment * const env,
const RepositoryName & our_name,
const RepositoryCapabilities & caps) :
PrivateImplementationPattern<Repository>(new Implementation<Repository>(our_name)),
diff --git a/paludis/repository.hh b/paludis/repository.hh
index 2e9a1e2..2926345 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -251,7 +251,7 @@ namespace paludis
///\name Basic operations
///\{
- Repository(const RepositoryName &, const RepositoryCapabilities &);
+ Repository(const Environment * const, const RepositoryName &, const RepositoryCapabilities &);
///\}