aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-25 15:00:59 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-25 15:03:49 +0000
commit5245b7443b39b62762ef37ec95aae2f0ecb5cde5 (patch)
treef5336023295ce3b51cdb14acfc204f69f912e9e5
parent1329c8ecedf04c1bc7523b4a7bd3dea8b2f4e426 (diff)
downloadpaludis-5245b7443b39b62762ef37ec95aae2f0ecb5cde5.tar.gz
paludis-5245b7443b39b62762ef37ec95aae2f0ecb5cde5.tar.xz
Warn and ignore self in masters list
-rw-r--r--paludis/repositories/e/e_repository.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index dd99ab6..7a6662c 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -1241,6 +1241,8 @@ ERepository::repository_factory_create(
{
Context context("When making ebuild repository from repo_file '" + f("repo_file") + "':");
+ RepositoryName our_name(repository_factory_name(env, f));
+
std::string location(f("location"));
if (location.empty())
throw ERepositoryConfigurationError("Key 'location' not specified or empty");
@@ -1290,6 +1292,14 @@ ERepository::repository_factory_create(
Context context_local("When finding configuration information for master '" + *t + "':");
RepositoryName master_repository_name(*t);
+ if (master_repository_name == our_name)
+ {
+ Log::get_instance()->message("e.ebuild.configuration.own_master_repository", ll_warning, lc_context)
+ << "According to '" << stringify(FSPath(location) / "metadata/layout.conf")
+ << "', the repository '" << our_name << "' has itself as a master, which is invalid";
+ continue;
+ }
+
try
{
std::shared_ptr<Repository> master_repository_uncasted(