aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/registration.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-06-30 05:34:25 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-06-30 05:34:25 +0100
commita7eff252d935e5654a2e039dff6cce547e4fd999 (patch)
tree1964a54d33dfdbb21ea99db24ec5a240cabb6eae /paludis/repositories/e/registration.cc
parent8e4a4a04e8e87102f97f75485c772c5cf408742c (diff)
downloadpaludis-a7eff252d935e5654a2e039dff6cce547e4fd999.tar.gz
paludis-a7eff252d935e5654a2e039dff6cce547e4fd999.tar.xz
Make repository_defaults.conf work again.
Rather than passing a map to the repository VC, we pass a function. This means we don't have to iterate over a KeyValueConfigFile's keys, which doesn't work well with a defaults function. Fixes: ticket:609. Squashed commit of the following: commit 47b484222ad25a47c088af5eec332219ece400c6 Author: Ciaran McCreesh <ciaran.mccreesh@googlemail.com> Date: Mon Jun 30 05:33:41 2008 +0100 moar commit 653477eb3f89044ef1fbd5d878c54acb6afc27e8 Author: Ciaran McCreesh <ciaran.mccreesh@googlemail.com> Date: Mon Jun 30 04:42:55 2008 +0100 start
Diffstat (limited to 'paludis/repositories/e/registration.cc')
-rw-r--r--paludis/repositories/e/registration.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/paludis/repositories/e/registration.cc b/paludis/repositories/e/registration.cc
index fcd346fd1..e22e2cebb 100644
--- a/paludis/repositories/e/registration.cc
+++ b/paludis/repositories/e/registration.cc
@@ -40,18 +40,14 @@ namespace
std::tr1::shared_ptr<Repository>
make_portage_repository(
Environment * const env,
- std::tr1::shared_ptr<const Map<std::string, std::string> > m)
+ const std::tr1::function<std::string (const std::string &)> & f)
{
- std::string repo_file = "?";
- if (m->end() != m->find("repo_file"))
- repo_file = m->find("repo_file")->second;
-
- Context context("When creating repository using '" + repo_file + "':");
+ Context context("When creating repository using '" + f("repo_file") + "':");
Log::get_instance()->message("e.portage.configuration.deprecated", ll_warning, lc_context)
<< "Format 'portage' is deprecated, use 'ebuild' instead";
- return make_ebuild_repository_wrapped(env, m);
+ return make_ebuild_repository_wrapped(env, f);
}
}