summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/portage.57
-rw-r--r--pym/portage/repository/config.py10
2 files changed, 15 insertions, 2 deletions
diff --git a/man/portage.5 b/man/portage.5
index 80e42de75..7fe21283c 100644
--- a/man/portage.5
+++ b/man/portage.5
@@ -679,14 +679,15 @@ order:
.RS
.TP
.BR layout.conf
-Specifies information about the repository layout. Currently, only a single
+Specifies information about the repository layout. A
"masters" attribute is supported, which is used to specify names of
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)). Repositories listed
toward the right of the \fBmasters\fR list take precedence over those listed
-toward the left of the list. \fISite-specific\fR
+toward the left of the list. An "aliases" attribute is also supported, which
+behaves like an "aliases" attribute in \fBrepos.conf\fR. \fISite-specific\fR
overrides to \fBlayout.conf\fR settings may be specified in
\fB/etc/portage/repos.conf\fR. Settings in \fBrepos.conf\fR take
precedence over settings in \fBlayout.conf\fR, except tools such as
@@ -699,6 +700,8 @@ precedence over settings in \fBlayout.conf\fR, except tools such as
# eclasses provided by java-overlay take precedence over identically named
# eclasses that are provided by gentoo
masters = gentoo java-overlay
+# indicate that this repo can be used as a substitute for foo-overlay
+aliases = foo-overlay
.fi
.RE
.TP
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 36dee484a..1f2e48012 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -299,6 +299,16 @@ class RepoConfigLoader(object):
masters = None
repo.masters = masters
+ aliases = layout_data.get('aliases')
+ if aliases and aliases.strip():
+ aliases = aliases.split()
+ else:
+ aliases = None
+ if aliases:
+ if repo.aliases:
+ aliases.extend(repo.aliases)
+ repo.aliases = tuple(sorted(set(aliases)))
+
#Take aliases into account.
new_prepos = {}
for repo_name, repo in prepos.items():