summaryrefslogtreecommitdiffstats
path: root/bin/repoman
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-07-05 17:57:14 +0000
committerZac Medico <zmedico@gentoo.org>2006-07-05 17:57:14 +0000
commit0b05a2f3f07836bc358576921030850f4bd3eee6 (patch)
treed504052d08e616074dcffcc38c0236bd36755581 /bin/repoman
parent9fedb5102c0c1ddc248a8c7f082382d59ebc9f4b (diff)
downloadportage-0b05a2f3f07836bc358576921030850f4bd3eee6.tar.gz
portage-0b05a2f3f07836bc358576921030850f4bd3eee6.tar.bz2
portage-0b05a2f3f07836bc358576921030850f4bd3eee6.zip
Fix repoman breakage due to the fact that portage.portagetree now creates it's own portdbapi instance. Repoman will now use a single portdbapi instance instead of one for each arch. The arch specific config instances are swapped in on the fly. Hopefully this fixes bug #132601.
svn path=/main/trunk/; revision=3790
Diffstat (limited to 'bin/repoman')
-rwxr-xr-xbin/repoman16
1 files changed, 9 insertions, 7 deletions
diff --git a/bin/repoman b/bin/repoman
index 5aef6da10..6df7e97ef 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -481,7 +481,7 @@ if quiet < 2:
print "PORTDIR = \""+os.environ["PORTDIR"]+"\""
print "PORTDIR_OVERLAY = \""+os.environ["PORTDIR_OVERLAY"]+"\""
-
+portage.close_portdbapi_caches()
reload(portage)
repoman_settings = portage.config(clone=portage.settings)
@@ -1138,14 +1138,16 @@ for x in scanlist:
profdir = portdir+"/profiles/"+prof[0]
- if arch_caches.has_key(prof[0]):
- dep_settings, portage.portdb, portage.db["/"]["porttree"] = arch_caches[prof[0]]
+ if prof[0] in arch_caches:
+ dep_settings = arch_caches[prof[0]]
else:
- dep_settings=portage.config(config_profile_path=profdir, config_incrementals=portage_const.INCREMENTALS)
- portage.portdb=portage.portdbapi(portdir, dep_settings)
- portage.db["/"]["porttree"]=portage.portagetree("/",dep_settings.getvirtuals("/"))
- arch_caches[prof[0]]=[dep_settings, portage.portdb, portage.db["/"]["porttree"]]
+ dep_settings = portage.config(
+ config_profile_path=profdir,
+ config_incrementals=portage_const.INCREMENTALS)
+ arch_caches[prof[0]] = dep_settings
+ portage.db["/"]["porttree"].settings = dep_settings
+ portage.db["/"]["porttree"].dbapi.mysettings = dep_settings
dep_settings["ACCEPT_KEYWORDS"] = " ".join(groups)
for myprovide in myaux["PROVIDE"].split():