Use _prepare_env_file() to extract the binary package environment.bz2
authorZac Medico <zmedico@gentoo.org>
Wed, 18 Aug 2010 20:01:54 +0000 (13:01 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 18 Aug 2010 20:01:54 +0000 (13:01 -0700)
prior to the pkg_setup phase. This fixes a regression since EbuildPhase
no longer calls doebuild(), and therefore _prepare_env_file() needs
to be called now.

pym/_emerge/Binpkg.py

index 6fdc1a6f4b6948e140a3873ac277b898948dfe6e..4dee0925f0217b5312c4b0924e3eba22e9c9ed3e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from _emerge.EbuildPhase import EbuildPhase
@@ -16,6 +16,7 @@ from portage import _unicode_encode
 import codecs
 import logging
 from portage.output import colorize
+from portage.package.ebuild.doebuild import _prepare_env_file
 
 class Binpkg(CompositeTask):
 
@@ -254,6 +255,14 @@ class Binpkg(CompositeTask):
                finally:
                        f.close()
 
+               rval = _prepare_env_file(self.settings)
+               if rval != os.EX_OK:
+                       self._current_phase = None
+                       self.returncode = rval
+                       self._unlock_builddir()
+                       self.wait()
+                       return
+
                # This gives bashrc users an opportunity to do various things
                # such as remove binary packages after they're installed.
                settings = self.settings