aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/e_repository.cc
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 /paludis/repositories/e/e_repository.cc
parent029999d6b31dce81b5ea73b5266dd7ed9cd282a3 (diff)
downloadpaludis-b39056a8f6b596cf3b3aa0941397650dc316aca6.tar.gz
paludis-b39056a8f6b596cf3b3aa0941397650dc316aca6.tar.xz
Don't try too hard to specify masters
Fixes: ticket:1176
Diffstat (limited to 'paludis/repositories/e/e_repository.cc')
-rw-r--r--paludis/repositories/e/e_repository.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 2b2a15f86..9209619dc 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));