Make EbuildBuildDir.clean_log() do nothing when FEATURES=keepwork is
authorZac Medico <zmedico@gentoo.org>
Fri, 16 Jul 2010 07:22:17 +0000 (00:22 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 16 Jul 2010 07:22:17 +0000 (00:22 -0700)
enabled.

pym/_emerge/EbuildBuildDir.py

index dc7e1daa5ac6a0ce0f61ae8c33d2a47e605f7a55..d9e471639b19cb3a07fe7c6745c79eadb076ad32 100644 (file)
@@ -60,8 +60,12 @@ class EbuildBuildDir(SlotObject):
                                portage.locks.unlockdir(catdir_lock)
 
        def clean_log(self):
-               """Discard existing log."""
+               """Discard existing log. The log will not be be discarded
+               in cases when it would not make sense, like when FEATURES=keepwork
+               is enabled."""
                settings = self.settings
+               if 'keepwork' in settings.features:
+                       return
                log_file = settings.get('PORTAGE_LOG_FILE')
                if log_file is not None and os.path.isfile(log_file):
                        try: