aboutsummaryrefslogtreecommitdiff
path: root/paludis
diff options
context:
space:
mode:
Diffstat (limited to 'paludis')
-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 d4c03f0e7..b2bf9306e 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 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));