From: Zac Medico Date: Mon, 23 Mar 2009 05:49:17 +0000 (-0000) Subject: When calling doebuild() to spawn the 'depend' phase, just call config.setcpv() X-Git-Tag: v2.2_rc27~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1243f8021a2f0b3ed5cdb2060d67f6d3905e3d4e;p=portage.git When calling doebuild() to spawn the 'depend' phase, just call config.setcpv() since that should be enough (no need for separate reset or reload calls). svn path=/main/trunk/; revision=13170 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index bee4dc5a0..17fec42d1 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -3027,7 +3027,7 @@ class EbuildMetadataPhase(SubProcess): def _start(self): settings = self.settings - settings.reset() + settings.setcpv(self.cpv) ebuild_path = self.ebuild_path debug = settings.get("PORTAGE_DEBUG") == "1" master_fd = None diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 21f671b43..f56c64471 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -5045,14 +5045,14 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m tmpdir = mysettings["PORTAGE_TMPDIR"] if mycpv != mysettings.mycpv: - # Reload env.d variables and reset any previous settings. - mysettings.reload() - mysettings.reset() if mydo == 'depend': # Don't pass in mydbapi here since the resulting aux_get # call would lead to infinite 'depend' phase recursion. mysettings.setcpv(mycpv) else: + # Reload env.d variables and reset any previous settings. + mysettings.reload() + mysettings.reset() mysettings.setcpv(mycpv, mydb=mydbapi) # config.reset() might have reverted a change made by the caller, diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 93730e9c3..077715239 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -417,7 +417,7 @@ class portdbapi(dbapi): writemsg("doregen: %s %s\n" % (doregen, mycpv), 2) writemsg("Generating cache entry(0) for: "+str(myebuild)+"\n", 1) - self.doebuild_settings.reset() + self.doebuild_settings.setcpv(mycpv) mydata = {} myret = doebuild(myebuild, "depend", self.doebuild_settings["ROOT"], self.doebuild_settings,