diff options
author | 2011-09-14 13:03:37 +0100 | |
---|---|---|
committer | 2011-09-14 13:03:37 +0100 | |
commit | 7d101615917b9a8f011b9841409c455c0732c885 (patch) | |
tree | 5ae22cf6aba8b8efe6808594b42efa064f4ae58f | |
parent | 12fdd07da80b04724dce37b1a5d87215be245999 (diff) | |
download | paludis-7d101615917b9a8f011b9841409c455c0732c885.tar.gz paludis-7d101615917b9a8f011b9841409c455c0732c885.tar.xz |
Pass root into output confs
-rw-r--r-- | paludis/environments/paludis/output_conf.cc | 8 | ||||
-rw-r--r-- | paludis/environments/paludis/output_conf.hh | 2 | ||||
-rw-r--r-- | paludis/environments/paludis/paludis_config.cc | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/paludis/environments/paludis/output_conf.cc b/paludis/environments/paludis/output_conf.cc index 6e5b96526..44d5cea46 100644 --- a/paludis/environments/paludis/output_conf.cc +++ b/paludis/environments/paludis/output_conf.cc @@ -332,10 +332,15 @@ namespace } void -OutputConf::add(const FSPath & filename) +OutputConf::add(const FSPath & filename, const FSPath & root) { Context context("When adding source '" + stringify(filename) + "' as an output file:"); + _imp->predefined_variables->erase(std::string("root")); + _imp->predefined_variables->insert("root", stringify(root)); + _imp->predefined_variables->erase(std::string("ROOT")); + _imp->predefined_variables->insert("ROOT", stringify(root)); + std::shared_ptr<KeyValueConfigFile> f(make_bashable_kv_conf(filename, _imp->predefined_variables, { kvcfo_allow_sections, kvcfo_allow_fancy_assigns, kvcfo_allow_env })); if (! f) @@ -491,3 +496,4 @@ namespace paludis { template class Pimp<paludis_environment::OutputConf>; } + diff --git a/paludis/environments/paludis/output_conf.hh b/paludis/environments/paludis/output_conf.hh index bb07ba657..1bf8d5444 100644 --- a/paludis/environments/paludis/output_conf.hh +++ b/paludis/environments/paludis/output_conf.hh @@ -52,7 +52,7 @@ namespace paludis /** * Add another file. */ - void add(const FSPath &); + void add(const FSPath &, const FSPath & root); const std::shared_ptr<OutputManager> create_output_manager( const CreateOutputManagerInfo &) const; diff --git a/paludis/environments/paludis/paludis_config.cc b/paludis/environments/paludis/paludis_config.cc index e695e6390..f70154b7f 100644 --- a/paludis/environments/paludis/paludis_config.cc +++ b/paludis/environments/paludis/paludis_config.cc @@ -705,7 +705,7 @@ PaludisConfig::PaludisConfig(PaludisEnvironment * const e, const std::string & s if (! file->stat().exists()) continue; - _imp->output_conf->add(*file); + _imp->output_conf->add(*file, FSPath(_imp->root)); any = true; } |