diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-10-08 03:27:43 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-10-08 03:27:43 +0000 |
commit | f16b2971614482686a85e3f4367f2e6de8e5f3c2 (patch) | |
tree | 88cc88caf013200bf75e1c6de6cbbb75fe43bb30 | |
parent | 89dc953774618019748aab9a3a7b958a6fe3e007 (diff) | |
download | portage-f16b2971614482686a85e3f4367f2e6de8e5f3c2.tar.gz portage-f16b2971614482686a85e3f4367f2e6de8e5f3c2.tar.bz2 portage-f16b2971614482686a85e3f4367f2e6de8e5f3c2.zip |
Before returning config instances from Scheduler._allocate_config(), call the
config.reset() method to make sure all settings from the previous package get
flushed out (such as PORTAGE_LOG_FILE). This fixes a case where
PORTAGE_LOG_FILE leaked from the previous package to the clean phase of the
next one, resulting in an IOError due to the path being invalid and the parent
directory being nonexistent.
svn path=/main/trunk/; revision=11655
-rw-r--r-- | pym/_emerge/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index f8c2dcf9f..decec9864 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -9928,6 +9928,10 @@ class Scheduler(PollScheduler): temp_settings = self._config_pool[root].pop() else: temp_settings = portage.config(clone=self.pkgsettings[root]) + # Since config.setcpv() isn't guaranteed to call config.reset() due to + # performance reasons, call it here to make sure all settings from the + # previous package get flushed out (such as PORTAGE_LOG_FILE). + temp_settings.reset() return temp_settings def _deallocate_config(self, settings): |