summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-04-24 00:08:57 +0000
committerZac Medico <zmedico@gentoo.org>2006-04-24 00:08:57 +0000
commit12bbf9413b34cf8af252695baac2c3948a9b78aa (patch)
tree9af26d9bf8c05840b69d7a0c263d3e5808a12998
parent1600d772a443b8550279889ea16c25f50749e702 (diff)
downloadportage-12bbf9413b34cf8af252695baac2c3948a9b78aa.tar.gz
portage-12bbf9413b34cf8af252695baac2c3948a9b78aa.tar.bz2
portage-12bbf9413b34cf8af252695baac2c3948a9b78aa.zip
Move thirdpartymirrors stacking out of global scope.
svn path=/main/trunk/; revision=3205
-rw-r--r--pym/portage.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 0b5a1c29e..d7b854dbd 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -1643,6 +1643,12 @@ class config:
return mydict
+ def thirdpartymirrors(self):
+ profileroots = [os.path.join(self["PORTDIR"], "profiles")]
+ for x in settings["PORTDIR_OVERLAY"].split():
+ profileroots.insert(0, os.path.join(x, "profiles"))
+ thirdparty_lists = [grabdict(os.path.join(x, "thirdpartymirrors")) for x in profileroots]
+ return stack_dictlist(thirdparty_lists, incremental=True)
# XXX This would be to replace getstatusoutput completely.
# XXX Issue: cannot block execution. Deadlock condition.
@@ -6835,11 +6841,7 @@ if root!="/":
db[root]["porttree"] = portagetree(root)
db[root].addLazyItem("bintree", LazyBintreeItem(root))
-profileroots = [settings["PORTDIR"]+"/profiles/"]
-for x in settings["PORTDIR_OVERLAY"].split():
- profileroots.insert(0, x+"/profiles/")
-thirdparty_lists = [grabdict(os.path.join(x, "thirdpartymirrors")) for x in profileroots]
-thirdpartymirrors = stack_dictlist(thirdparty_lists, incremental=True)
+thirdpartymirrors = settings.thirdpartymirrors()
if not os.path.exists(settings["PORTAGE_TMPDIR"]):
writemsg("portage: the directory specified in your PORTAGE_TMPDIR variable, \""+settings["PORTAGE_TMPDIR"]+",\"\n")