summaryrefslogtreecommitdiffstats
path: root/pym/portage
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage')
-rw-r--r--pym/portage/__init__.py1
-rw-r--r--pym/portage/dbapi/porttree.py9
2 files changed, 8 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 0b65570c0..8e73e211a 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -1132,6 +1132,7 @@ class config(object):
"PORTAGE_GPG_DIR",
"PORTAGE_GPG_KEY", "PORTAGE_IONICE_COMMAND",
"PORTAGE_PACKAGE_EMPTY_ABORT",
+ "PORTAGE_REPO_DUPLICATE_WARN",
"PORTAGE_RO_DISTDIRS",
"PORTAGE_RSYNC_EXTRA_OPTS", "PORTAGE_RSYNC_OPTS",
"PORTAGE_RSYNC_RETRIES", "PORTAGE_USE", "PORT_LOGDIR",
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index ed9ed99a4..a9496c8eb 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -143,7 +143,7 @@ class portdbapi(dbapi):
repository_map = {}
self.treemap = treemap
self._repository_map = repository_map
- identically_named_paths = set()
+ identically_named_paths = {}
for path in porttrees:
if path in repository_map:
continue
@@ -160,7 +160,7 @@ class portdbapi(dbapi):
if identically_named_path is not None:
# The earlier one is discarded.
del repository_map[identically_named_path]
- identically_named_paths.add(identically_named_path)
+ identically_named_paths[identically_named_path] = repo_name
if identically_named_path == porttrees[0]:
# Found another repo with the same name as
# $PORTDIR, so update porttrees[0] to match.
@@ -171,6 +171,11 @@ class portdbapi(dbapi):
# Ensure that each repo_name is unique. Later paths override
# earlier ones that correspond to the same name.
porttrees = [x for x in porttrees if x not in identically_named_paths]
+ ignored_map = {}
+ for path, repo_name in identically_named_paths.iteritems():
+ ignored_map.setdefault(repo_name, []).append(path)
+ self._ignored_repos = tuple((repo_name, tuple(paths)) \
+ for repo_name, paths in ignored_map.iteritems())
self.porttrees = porttrees
porttree_root = porttrees[0]