From 0b05a2f3f07836bc358576921030850f4bd3eee6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 5 Jul 2006 17:57:14 +0000 Subject: [PATCH] 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 --- bin/repoman | 16 +++++++++------- 1 file 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(): -- 2.26.2