Specifies \fIsite\-specific\fR repository configuration information. Note that
configuration settings which are specified here do not apply to tools
such as \fBrepoman\fR(1) and \fBegencache\fR(1) since their operations
-are inherently \fBnot\fR \fIsite\-specific\fR. Beware that use of
-\fBeclass\-overrides\fR is generally not recommended and that it may trigger
+are inherently \fBnot\fR \fIsite\-specific\fR. \fBWARNING:\fR Use of
+\fBrepos.conf\fR is generally not recommended since resulting changes in
+eclass inheritance (especially due ot \fBeclass\-overrides\fR) may trigger
performance issues under some circumstances (see \fBbug #124041\fR).
.I Example:
# disable all eclass overrides for ebuilds from the gentoo repository
[gentoo]
eclass\-overrides =
+
+# override the metadata/layout.conf masters setting from the kde-testing repo
+[kde-testing]
+masters = gentoo kde
.fi
.RE
.TP
repositories which satisfy dependencies on eclasses and/or ebuilds. Each
repository name should correspond the value of a \fBrepo_name\fR entry
from one of the repositories that is configured via the \fBPORTDIR\fR or
-\fBPORTDIR_OVERLAY\fR variables (see \fBmake.conf\fR(5)).
+\fBPORTDIR_OVERLAY\fR variables (see \fBmake.conf\fR(5)). Site-specific
+overrides to \fBlayout.conf\fR settings may be specified in
+\fB/etc/portage/repos.conf\fR.
.I Example:
.nf
return regex
class _local_repo_config(object):
- __slots__ = ('eclass_overrides', 'name',)
+ __slots__ = ('eclass_overrides', 'masters', 'name',)
def __init__(self, name, repo_opts):
self.name = name
- self.eclass_overrides = \
- tuple(repo_opts.get('eclass-overrides', '').split())
+
+ eclass_overrides = repo_opts.get('eclass-overrides')
+ if eclass_overrides is not None:
+ eclass_overrides = tuple(eclass_overrides.split())
+ self.eclass_overrides = eclass_overrides
+
+ masters = repo_opts.get('masters')
+ if masters is not None:
+ masters = tuple(masters.split())
+ self.masters = masters
class config(object):
"""
continue
repo_name = self._repository_map.get(path)
+
+ loc_repo_conf = None
+ if local_repo_configs is not None:
+ if repo_name is not None:
+ loc_repo_conf = local_repo_configs.get(repo_name)
+ else:
+ loc_repo_conf = default_loc_repo_config
+
layout_filename = os.path.join(path, "metadata/layout.conf")
layout_file = KeyValuePairFileLoader(layout_filename, None, None)
layout_data, layout_errors = layout_file.load()
porttrees = []
- for master_name in layout_data.get('masters', '').split():
+
+ masters = None
+ if loc_repo_conf is not None and \
+ loc_repo_conf.masters is not None:
+ masters = loc_repo_conf.masters
+ else:
+ masters = layout_data.get('masters', '').split()
+
+ for master_name in masters:
master_path = self.treemap.get(master_name)
if master_path is None:
writemsg_level(("Unavailable repository '%s' " + \
porttrees.append(path)
- if local_repo_configs is not None:
- loc_repo_conf = None
- if repo_name is not None:
- loc_repo_conf = local_repo_configs.get(repo_name)
- if loc_repo_conf is None:
- loc_repo_conf = default_loc_repo_config
- if loc_repo_conf is not None:
+ if loc_repo_conf is not None and \
+ loc_repo_conf.eclass_overrides is not None:
for other_name in loc_repo_conf.eclass_overrides:
other_path = self.treemap.get(other_name)
if other_path is None: