summaryrefslogtreecommitdiffstats
path: root/pym/portage/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/__init__.py')
-rw-r--r--pym/portage/__init__.py6
1 files changed, 3 insertions, 3 deletions
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,