.I Example:
.nf
+[DEFAULT]
# make all repositories inherit eclasses from the java\-overlay and
# java\-experimental repositories, with eclasses from java\-experimental
# taking precedence over those from java\-overlay
-[DEFAULT]
eclass\-overrides = java\-overlay java\-experimental
-# disable all eclass overrides for ebuilds from the gentoo repository
[gentoo]
+# disable all eclass overrides for ebuilds from the gentoo repository
eclass\-overrides =
+# when processing metadata/layout.conf from other repositories, substitute
+# 'gentoo' in place of references to repositories named 'foo' and 'bar'
+aliases = foo bar
-# override the metadata/layout.conf masters setting from the kde-testing repo
[kde-testing]
+# override the metadata/layout.conf masters setting from the kde-testing repo
masters = gentoo kde
.fi
.RE
return regex
class _local_repo_config(object):
- __slots__ = ('eclass_overrides', 'masters', 'name',)
+ __slots__ = ('aliases', 'eclass_overrides', 'masters', 'name',)
def __init__(self, name, repo_opts):
self.name = name
+ aliases = repo_opts.get('aliases')
+ if aliases is not None:
+ aliases = tuple(aliases.split())
+ self.aliases = aliases
+
eclass_overrides = repo_opts.get('eclass-overrides')
if eclass_overrides is not None:
eclass_overrides = tuple(eclass_overrides.split())
eclass_dbs = {porttree_root : self.eclassdb}
local_repo_configs = self.mysettings._local_repo_configs
default_loc_repo_config = None
+ repo_aliases = {}
if local_repo_configs is not None:
default_loc_repo_config = local_repo_configs.get('DEFAULT')
+ for repo_name, loc_repo_conf in local_repo_configs.iteritems():
+ if loc_repo_conf.aliases is not None:
+ for alias in loc_repo_conf.aliases:
+ overridden_alias = repo_aliases.get(alias)
+ if overridden_alias is not None:
+ writemsg_level(("!!! Alias '%s' " + \
+ "created for '%s' overrides " + \
+ "'%s' alias in " + \
+ "'%s'\n") % (alias, repo_name,
+ overridden_alias,
+ self.mysettings._local_repo_conf_path),
+ level=logging.WARNING, noiselevel=-1)
+ repo_aliases[alias] = repo_name
+
for path in self.porttrees:
if path in self._repo_info:
continue
masters = layout_data.get('masters', '').split()
for master_name in masters:
+ master_name = repo_aliases.get(master_name, master_name)
master_path = self.treemap.get(master_name)
if master_path is None:
writemsg_level(("Unavailable repository '%s' " + \