From f16b2971614482686a85e3f4367f2e6de8e5f3c2 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 8 Oct 2008 03:27:43 +0000 Subject: 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 --- pym/_emerge/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pym/_emerge') 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): -- cgit v1.2.3-1-g7c22