diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-07-05 22:36:45 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-07-05 22:36:45 +0000 |
commit | a970eaebf0c87ffb4e18a057e8e2d470d8dd176b (patch) | |
tree | e8012e5cd0b2983c676f5dcb198d042b46e76c8c | |
parent | 7d020ab97b621d1df1223c1308ca68007296bfed (diff) | |
download | portage-a970eaebf0c87ffb4e18a057e8e2d470d8dd176b.tar.gz portage-a970eaebf0c87ffb4e18a057e8e2d470d8dd176b.tar.bz2 portage-a970eaebf0c87ffb4e18a057e8e2d470d8dd176b.zip |
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
-rw-r--r-- | pym/portage.py | 9 |
1 files changed, 7 insertions, 2 deletions
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) |