aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-18 20:43:19 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-18 20:43:26 +0000
commit56c42c4f9f3f558649b2b5ebb3f490736435998e (patch)
tree0c69b92b2b4e396c109e26d434c716491c0d42b9
parent12bec8f9d85d3a416f7dc6a59f01a658273d2119 (diff)
downloadpaludis-56c42c4f9f3f558649b2b5ebb3f490736435998e.tar.gz
paludis-56c42c4f9f3f558649b2b5ebb3f490736435998e.tar.xz
Don't use full repo
-rw-r--r--paludis/repositories/e/exheres_profile.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/paludis/repositories/e/exheres_profile.cc b/paludis/repositories/e/exheres_profile.cc
index 6931b1e..bca3e61 100644
--- a/paludis/repositories/e/exheres_profile.cc
+++ b/paludis/repositories/e/exheres_profile.cc
@@ -73,7 +73,6 @@ namespace paludis
struct Imp<ExheresProfile>
{
const Environment * const env;
- const ERepository * const repository;
std::shared_ptr<FSPathSequence> profiles_with_parents;
@@ -93,11 +92,13 @@ namespace paludis
const std::shared_ptr<SetSpecTree> system_packages;
+ const bool has_master_repositories;
+ const EAPIForFileFunction eapi_for_file;
+
Imp(const Environment * const e, const ERepository * const p,
const RepositoryName &, const FSPathSequence &,
const std::string &, const bool) :
env(e),
- repository(p),
profiles_with_parents(std::make_shared<FSPathSequence>()),
options_conf(make_named_values<PaludisLikeOptionsConfParams>(
n::allow_locking() = true,
@@ -112,7 +113,9 @@ namespace paludis
use_expand_implicit(std::make_shared<Set<std::string>>()),
iuse_implicit(std::make_shared<Set<std::string>>()),
use_expand_values(std::make_shared<Set<std::string>>()),
- system_packages(std::make_shared<SetSpecTree>(std::make_shared<AllDepSpec>()))
+ system_packages(std::make_shared<SetSpecTree>(std::make_shared<AllDepSpec>())),
+ has_master_repositories(p->params().master_repositories()),
+ eapi_for_file(std::bind(&ERepository::eapi_for_file, p, std::placeholders::_1))
{
environment_variables["CONFIG_PROTECT"] = getenv_with_default("CONFIG_PROTECT", "/etc");
environment_variables["CONFIG_PROTECT_MASK"] = getenv_with_default("CONFIG_PROTECT_MASK", "");
@@ -146,7 +149,7 @@ ExheresProfile::ExheresProfile(
ChoicePrefixName("hidden_suboptions"), *f).first.is_true())
_imp->use_expand_hidden->insert(stringify(*f));
- if (! _imp->repository->params().master_repositories())
+ if (! _imp->has_master_repositories)
for (ProfileFile<LineConfigFile>::ConstIterator i(_imp->packages_file.begin()),
i_end(_imp->packages_file.end()) ; i != i_end ; ++i)
{
@@ -228,8 +231,7 @@ ExheresProfile::_load_dir(const FSPath & f)
if ((f / "make.defaults").stat().exists())
{
- const std::shared_ptr<const EAPI> eapi(EAPIData::get_instance()->eapi_from_string(
- _imp->repository->eapi_for_file(f / "make.defaults")));
+ auto eapi(EAPIData::get_instance()->eapi_from_string(_imp->eapi_for_file(f / "make.defaults")));
if (! eapi->supported())
throw ERepositoryConfigurationError("Can't use profile directory '" + stringify(f) +
"' because it uses an unsupported EAPI");