From: Zac Medico Date: Wed, 5 Jul 2006 22:36:45 +0000 (-0000) Subject: Cache a cloned config instance inside portdbapi so that a new one doesn't have to... X-Git-Tag: v2.1.1~277 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a970eaebf0c87ffb4e18a057e8e2d470d8dd176b;p=portage.git Cache a cloned config instance inside portdbapi so that a new one doesn't have to be cloned each time metadata generation is triggered. svn path=/main/trunk/; revision=3793 --- diff --git a/pym/portage.py b/pym/portage.py index f1ed48e27..df96086e5 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -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)