When the Binpkg class has fetched a package in --fetchonly mode, wait until
authorZac Medico <zmedico@gentoo.org>
Fri, 12 Dec 2008 21:36:15 +0000 (21:36 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 12 Dec 2008 21:36:15 +0000 (21:36 -0000)
after the package is verified and injected before returning. (trunk r12193)

svn path=/main/branches/2.1.6/; revision=12226

pym/_emerge/__init__.py

index 4349459fef5be9473dd711747ea062be58d35bb5..14dc6bb10e6aeb3849880c81d958643a8db095ee 100644 (file)
@@ -3192,11 +3192,7 @@ class Binpkg(CompositeTask):
                # --getbinpkg is enabled.
                if fetcher.returncode is not None:
                        self._fetched_pkg = True
-                       if self.opts.fetchonly:
-                               self._final_exit(fetcher)
-                               self.wait()
-                               return
-                       elif self._default_exit(fetcher) != os.EX_OK:
+                       if self._default_exit(fetcher) != os.EX_OK:
                                self.wait()
                                return
 
@@ -3229,6 +3225,12 @@ class Binpkg(CompositeTask):
                if self._fetched_pkg:
                        self._bintree.inject(pkg.cpv, filename=pkg_path)
 
+               if self.opts.fetchonly:
+                       self._current_task = None
+                       self.returncode = os.EX_OK
+                       self.wait()
+                       return
+
                msg = " === (%s of %s) Merging Binary (%s::%s)" % \
                        (pkg_count.curval, pkg_count.maxval, pkg.cpv, pkg_path)
                short_msg = "emerge: (%s of %s) %s Merge Binary" % \