aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-21 20:34:49 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-21 20:37:18 +0100
commitb39056a8f6b596cf3b3aa0941397650dc316aca6 (patch)
tree12042ac87b09ecf503cc90f2e1dbe48a820fb1d5
parent029999d6b31dce81b5ea73b5266dd7ed9cd282a3 (diff)
downloadpaludis-b39056a8f6b596cf3b3aa0941397650dc316aca6.tar.gz
paludis-b39056a8f6b596cf3b3aa0941397650dc316aca6.tar.xz
Don't try too hard to specify masters
Fixes: ticket:1176
-rw-r--r--paludis/environments/portage/portage_environment.cc2
-rw-r--r--paludis/repositories/e/e_repository.cc11
2 files changed, 8 insertions, 5 deletions
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index d4c03f0..b2bf930 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -482,7 +482,7 @@ PortageEnvironment::_add_ebuild_repository(const FSPath & portdir, const std::st
stringify(_imp->conf_dir / "portage" / "profile") : ""));
keys->insert("format", "e");
keys->insert("names_cache", "/var/empty");
- keys->insert("master_repository", master);
+ keys->insert("master_repository_if_unknown", master);
keys->insert("sync", sync);
keys->insert("distdir", stringify(_imp->vars->get("DISTDIR")));
std::string builddir(_imp->vars->get("PORTAGE_TMPDIR"));
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 2b2a15f..9209619 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -1140,7 +1140,11 @@ ERepository::repository_factory_create(
: 0);
std::shared_ptr<ERepositorySequence> master_repositories;
- if (! f("master_repository").empty())
+ std::string master_repository_str(f("master_repository"));
+ if (master_repository_str.empty() && ! layout_conf)
+ master_repository_str = f("master_repository_if_unknown");
+
+ if (! master_repository_str.empty())
{
if (layout_conf)
{
@@ -1149,10 +1153,9 @@ ERepository::repository_factory_create(
<< "'. You should probably remove the 'master_repository' setting from your repository config file.";
}
- Context context_local("When finding configuration information for master_repository '"
- + stringify(f("master_repository")) + "':");
+ Context context_local("When finding configuration information for master_repository '" + stringify(master_repository_str) + "':");
- RepositoryName master_repository_name(f("master_repository"));
+ RepositoryName master_repository_name(master_repository_str);
std::shared_ptr<Repository> master_repository_uncasted(
env->fetch_repository(master_repository_name));