thirdpartymirrors: use RepoConfig.prepos_order v2.2.0_alpha195
authorZac Medico <zmedico@gentoo.org>
Tue, 6 Aug 2013 20:01:59 +0000 (13:01 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 6 Aug 2013 20:01:59 +0000 (13:01 -0700)
This equivalent to, but more efficient than splitting PORTDIR_OVERLAY.

pym/portage/package/ebuild/config.py

index 070a522b9fa6a3010b1cd1088ab8d54635b7df23..92e6c3fedd209963347d2ffe6e74d7534823e083 100644 (file)
@@ -2684,10 +2684,11 @@ class config(object):
 
        def thirdpartymirrors(self):
                if getattr(self, "_thirdpartymirrors", None) is None:
-                       profileroots = [os.path.join(self["PORTDIR"], "profiles")]
-                       for x in shlex_split(self.get("PORTDIR_OVERLAY", "")):
-                               profileroots.insert(0, os.path.join(x, "profiles"))
-                       thirdparty_lists = [grabdict(os.path.join(x, "thirdpartymirrors")) for x in profileroots]
+                       thirdparty_lists = []
+                       for repo_name in reversed(self.repositories.prepos_order):
+                               thirdparty_lists.append(grabdict(os.path.join(
+                                       self.repositories[repo_name].location,
+                                       "profiles", "thirdpartymirrors")))
                        self._thirdpartymirrors = stack_dictlist(thirdparty_lists, incremental=True)
                return self._thirdpartymirrors