From: Zac Medico Date: Wed, 8 Oct 2008 03:27:43 +0000 (-0000) Subject: Before returning config instances from Scheduler._allocate_config(), call the X-Git-Tag: v2.2_rc12~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f16b2971614482686a85e3f4367f2e6de8e5f3c2;p=portage.git 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 --- 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):