aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--lib/portage/repository/config.py10
2 files changed, 9 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index d5a03533d..53ba9f5fb 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,9 @@ Bug fixes:
* vartree, movefile: Warn when rewriting a symlink (bug #934514).
+* repository: config: Allow a repository to be configured using one of its
+ aliases rather than its primary name (bug #935830).
+
portage-3.0.65 (2024-06-04)
--------------
diff --git a/lib/portage/repository/config.py b/lib/portage/repository/config.py
index c9dfffa22..46a2d8385 100644
--- a/lib/portage/repository/config.py
+++ b/lib/portage/repository/config.py
@@ -943,7 +943,9 @@ class RepoConfigLoader:
del prepos[repo_name]
continue
- if repo.name != repo_name:
+ if repo.name != repo_name and (
+ repo.aliases is None or repo_name not in repo.aliases
+ ):
writemsg_level(
"!!! %s\n"
% _(
@@ -957,13 +959,13 @@ class RepoConfigLoader:
del prepos[repo_name]
continue
- location_map[repo.location] = repo_name
- treemap[repo_name] = repo.location
+ location_map[repo.location] = repo.name
+ treemap[repo.name] = repo.location
# Add alias mappings, but never replace unaliased mappings.
for repo_name, repo in list(prepos.items()):
names = set()
- names.add(repo_name)
+ names.add(repo.name)
if repo.aliases:
aliases = stack_lists([repo.aliases], incremental=True)
names.update(aliases)