summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-18 23:46:28 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-18 23:46:28 +0000
commit27652753680f076cf0c204ce057779c32931f9f9 (patch)
tree20adbc2e8e155835ce4894326c9563ef9c361568
parentf1633f58bdc23476f691cce0f0efaaeab808535c (diff)
downloadportage-27652753680f076cf0c204ce057779c32931f9f9.tar.gz
portage-27652753680f076cf0c204ce057779c32931f9f9.tar.bz2
portage-27652753680f076cf0c204ce057779c32931f9f9.zip
Make sure mysettings.setcpv() always gets called when necessary inside
doebuild_environment(). svn path=/main/trunk/; revision=13136
-rw-r--r--pym/portage/__init__.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index bfa48c94d..dfcff6caf 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -5042,14 +5042,16 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m
# so that the caller can override it.
tmpdir = mysettings["PORTAGE_TMPDIR"]
- if mydo != "depend" and mycpv != mysettings.mycpv:
- """For performance reasons, setcpv only triggers reset when it
- detects a package-specific change in config. For the ebuild
- environment, a reset call is forced in order to ensure that the
- latest env.d variables are used."""
+ if mycpv != mysettings.mycpv:
+ # Reload env.d variables and reset any previous settings.
mysettings.reload()
- mysettings.reset(use_cache=use_cache)
- mysettings.setcpv(mycpv, use_cache=use_cache, mydb=mydbapi)
+ 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:
+ mysettings.setcpv(mycpv, mydb=mydbapi)
# config.reset() might have reverted a change made by the caller,
# so restore it to it's original value.