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
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):