aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'portage_with_autodep/pym/_emerge/MiscFunctionsProcess.py')
-rw-r--r--portage_with_autodep/pym/_emerge/MiscFunctionsProcess.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/portage_with_autodep/pym/_emerge/MiscFunctionsProcess.py b/portage_with_autodep/pym/_emerge/MiscFunctionsProcess.py
index ce0ab14..afa44fb 100644
--- a/portage_with_autodep/pym/_emerge/MiscFunctionsProcess.py
+++ b/portage_with_autodep/pym/_emerge/MiscFunctionsProcess.py
@@ -29,5 +29,11 @@ class MiscFunctionsProcess(AbstractEbuildProcess):
AbstractEbuildProcess._start(self)
def _spawn(self, args, **kwargs):
- self.settings.pop("EBUILD_PHASE", None)
- return spawn(" ".join(args), self.settings, **kwargs)
+ # Temporarily unset EBUILD_PHASE so that bashrc code doesn't
+ # think this is a real phase.
+ phase_backup = self.settings.pop("EBUILD_PHASE", None)
+ try:
+ return spawn(" ".join(args), self.settings, **kwargs)
+ finally:
+ if phase_backup is not None:
+ self.settings["EBUILD_PHASE"] = phase_backup