Ensure repo.priority is initialized.
authorSebastian Luther <SebastianLuther@gmx.de>
Tue, 19 Oct 2010 17:38:05 +0000 (19:38 +0200)
committerZac Medico <zmedico@gentoo.org>
Wed, 20 Oct 2010 18:03:07 +0000 (11:03 -0700)
Make sure repos in PORTDIR_OVERLAY get a priority even if they are in
repos.conf.

pym/portage/repository/config.py

index 102df5a2cdd8a8486bc23f54c3998e50e7e0c9c8..8882b878dd1918b3d13c6d4c12e8c89c20f34e7a 100644 (file)
@@ -244,12 +244,16 @@ class RepoConfigLoader(object):
                                                                ignored_location_map[old_location] = repo.name
                                                        prepos[repo.name].update(repo)
                                                else:
+                                                       prepos[repo.name] = repo
+
+                                               repo = prepos[repo.name]
+                                               if repo.priority is None:
                                                        if ov == portdir and portdir not in port_ov:
                                                                repo.priority = 1000
                                                        else:
                                                                repo.priority = base_priority
                                                                base_priority -= 1
-                                                       prepos[repo.name] = repo
+
                                        else:
                                                writemsg(_("!!! Invalid PORTDIR_OVERLAY"
                                                        " (not a dir): '%s'\n") % ov, noiselevel=-1)