prepos_order: avoid duplicates from aliases
authorZac Medico <zmedico@gentoo.org>
Mon, 20 Dec 2010 00:42:31 +0000 (16:42 -0800)
committerZac Medico <zmedico@gentoo.org>
Mon, 20 Dec 2010 00:42:31 +0000 (16:42 -0800)
pym/portage/repository/config.py

index 1f2e48012867708a18423835f1202bcfce80b974..281173323ed3eae289c47eae2d6352fe150b1f50 100644 (file)
@@ -330,7 +330,10 @@ class RepoConfigLoader(object):
                                location_map[r.location] = name
                                treemap[name] = r.location
 
-               prepos_order = [repo.name for repo in prepos.values() if repo.location is not None]
+               # filter duplicates from aliases, by only including
+               # items where repo.name == key
+               prepos_order = [repo.name for key, repo in prepos.items() \
+                       if repo.name == key and repo.location is not None]
                prepos_order.sort(key=repo_priority, reverse=True)
 
                if portdir in location_map: