aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2013-07-23 23:52:47 +0200
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2013-07-23 23:52:47 +0200
commitddf615015eea5d9800cce027708bfd3035c6472c (patch)
tree1945f568e83a3839536cde80b324b637ab8da403 /pym/portage/repository/config.py
parentUse consistent e-mail address in manuals. (diff)
downloadportage-ddf615015eea5d9800cce027708bfd3035c6472c.tar.gz
portage-ddf615015eea5d9800cce027708bfd3035c6472c.tar.bz2
portage-ddf615015eea5d9800cce027708bfd3035c6472c.zip
Add warning for missing masters attribute in layout.conf.
Diffstat (limited to 'pym/portage/repository/config.py')
-rw-r--r--pym/portage/repository/config.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 1bfe2f806..68e812119 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -197,7 +197,6 @@ class RepoConfig(object):
# Parse layout.conf.
if self.location:
- layout_filename = os.path.join(self.location, "metadata", "layout.conf")
layout_data = parse_layout_conf(self.location, self.name)[0]
# layout.conf masters may be overridden here if we have a masters
@@ -767,6 +766,17 @@ class RepoConfigLoader(object):
eclass_db.append(tree_db)
repo.eclass_db = eclass_db
+ for repo_name, repo in prepos.items():
+ if repo_name == "DEFAULT":
+ continue
+
+ if parse_layout_conf(repo.location, repo_name)[0]["masters"] is None and self.mainRepo() and \
+ repo_name != self.mainRepo().name and not portage._sync_disabled_warnings:
+ writemsg_level("!!! %s\n" % _("Repository '%s' is missing masters attribute in '%s'") %
+ (repo_name, os.path.join(repo.location, "metadata", "layout.conf")) +
+ "!!! %s\n" % _("Set 'masters = %s' in this file for future compatibility") %
+ self.mainRepo().name, level=logging.WARNING, noiselevel=-1)
+
self._prepos_changed = True
self._repo_location_list = []