In MetadataRegen._metadata_exit(), notify the consumer of failures (in this
authorZac Medico <zmedico@gentoo.org>
Tue, 31 Mar 2009 07:12:00 +0000 (07:12 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 31 Mar 2009 07:12:00 +0000 (07:12 -0000)
case the metadata argument is None).

svn path=/main/trunk/; revision=13258

pym/_emerge/__init__.py

index e325f1f25ee1b9408c80bb757452ffbd923fde26..2a372d78cd94424d9e1e22161a52388bcc519e8c 100644 (file)
@@ -11712,18 +11712,21 @@ class MetadataRegen(PollScheduler):
 
        def _metadata_exit(self, metadata_process):
                self._jobs -= 1
-               if metadata_process.returncode == os.EX_OK:
-                       if self._consumer is not None:
-                               self._consumer(metadata_process.cpv,
-                                       metadata_process.ebuild_path,
-                                       metadata_process.repo_path,
-                                       metadata_process.metadata)
-               else:
+               if metadata_process.returncode != os.EX_OK:
                        self.returncode = 1
                        self._error_count += 1
                        self._valid_pkgs.discard(metadata_process.cpv)
                        portage.writemsg("Error processing %s, continuing...\n" % \
                                (metadata_process.cpv,))
+
+               if self._consumer is not None:
+                       # On failure, still notify the consumer (in this case the metadata
+                       # argument is None).
+                       self._consumer(metadata_process.cpv,
+                               metadata_process.ebuild_path,
+                               metadata_process.repo_path,
+                               metadata_process.metadata)
+
                self._schedule()
 
 class UninstallFailure(portage.exception.PortageException):