Cache a cloned config instance inside portdbapi so that a new one doesn't have to...
authorZac Medico <zmedico@gentoo.org>
Wed, 5 Jul 2006 22:36:45 +0000 (22:36 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 5 Jul 2006 22:36:45 +0000 (22:36 -0000)
svn path=/main/trunk/; revision=3793

pym/portage.py

index f1ed48e278c03956e7ae68025df984ebc72c5abf..df96086e5c72deae9e8fdf8d2227ea4b6c303111 100644 (file)
@@ -4829,6 +4829,12 @@ class portdbapi(dbapi):
                        global settings
                        self.mysettings = config(clone=settings)
 
+               # This is strictly for use in aux_get() doebuild calls when metadata
+               # is generated by the depend phase.  It's safest to use a clone for
+               # this purpose because doebuild makes many changes to the config
+               # instance that is passed in.
+               self.doebuild_settings = config(clone=self.mysettings)
+
                self.manifestVerifyLevel  = None
                self.manifestVerifier     = None
                self.manifestCache        = {}    # {location: [stat, md5]}
@@ -5055,8 +5061,7 @@ class portdbapi(dbapi):
                                        writemsg("Uncaught handled exception: %(exception)s\n" % {"exception":str(e)})
                                        raise
 
-                       ebuild_settings = config(clone=self.mysettings)
-                       myret = doebuild(myebuild, "depend", "/", ebuild_settings,
+                       myret = doebuild(myebuild, "depend", "/", self.doebuild_settings,
                                dbkey=mydbkey, tree="porttree", mydbapi=self)
                        if myret:
                                portage_locks.unlockfile(mylock)