From 0e1754dfc3e2b41cbc021c1326e8f971afef3824 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 23 Mar 2009 05:55:31 +0000 Subject: [PATCH] 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). (trunk r13170) svn path=/main/branches/2.1.6/; revision=13171 --- pym/_emerge/__init__.py | 2 +- pym/portage/__init__.py | 6 +++--- pym/portage/dbapi/porttree.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 67ec6de0e..c1999dd08 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -3008,7 +3008,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 3e28b62b3..aa3c63b8b 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -5035,14 +5035,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, -- 2.26.2