Add missing self.wait() calls when tasks return unsuccessfully.
authorZac Medico <zmedico@gentoo.org>
Sat, 12 Jul 2008 11:52:40 +0000 (11:52 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 12 Jul 2008 11:52:40 +0000 (11:52 -0000)
svn path=/main/trunk/; revision=11027

pym/_emerge/__init__.py

index c68181f9b2a8f7b8d88cb3a37e8f45f9a02be1bd..e22ffd4550169d99d7676cb0a99e696aa04a2cf2 100644 (file)
@@ -1791,7 +1791,7 @@ class TaskSequence(CompositeTask):
 
        def _task_exit_handler(self, task):
                if self._default_exit(task) != os.EX_OK:
-                       pass
+                       self.wait()
                elif self._task_queue:
                        self._start_next_task()
                else:
@@ -2269,6 +2269,7 @@ class EbuildBuild(CompositeTask):
        def _build_exit(self, build):
                if self._default_exit(build) != os.EX_OK:
                        self._unlock_builddir()
+                       self.wait()
                        return
 
                opts = self.opts
@@ -2369,6 +2370,7 @@ class EbuildExecuter(CompositeTask):
        def _clean_phase_exit(self, clean_phase):
 
                if self._default_exit(clean_phase) != os.EX_OK:
+                       self.wait()
                        return
 
                pkg = self.pkg
@@ -2845,6 +2847,7 @@ class Binpkg(CompositeTask):
                                self.wait()
                                return
                        elif self._default_exit(fetcher) != os.EX_OK:
+                               self.wait()
                                return
 
                verifier = None
@@ -2858,7 +2861,8 @@ class Binpkg(CompositeTask):
        def _verifier_exit(self, verifier):
                if verifier is not None and \
                        self._default_exit(verifier) != os.EX_OK:
-                               return
+                       self.wait()
+                       return
 
                logger = self.logger
                pkg = self.pkg
@@ -2889,6 +2893,7 @@ class Binpkg(CompositeTask):
        def _clean_exit(self, clean_phase):
                if self._default_exit(clean_phase) != os.EX_OK:
                        self._unlock_builddir()
+                       self.wait()
                        return
 
                dir_path = self._build_dir.dir_path
@@ -2961,6 +2966,7 @@ class Binpkg(CompositeTask):
        def _setup_exit(self, setup_phase):
                if self._default_exit(setup_phase) != os.EX_OK:
                        self._unlock_builddir()
+                       self.wait()
                        return
 
                extractor = BinpkgExtractorAsync(background=self.background,