Before returning config instances from Scheduler._allocate_config(), call the
authorZac Medico <zmedico@gentoo.org>
Wed, 8 Oct 2008 03:27:43 +0000 (03:27 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 8 Oct 2008 03:27:43 +0000 (03:27 -0000)
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

index f8c2dcf9feb9072eabdb63a798e48e6701b66641..decec98644c0b89cc35acf3e07423c466c460a62 100644 (file)
@@ -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):