Use os.environ instead of the config.environ(). This solves binpkg extraction
authorZac Medico <zmedico@gentoo.org>
Fri, 12 Feb 2010 09:02:37 +0000 (09:02 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 12 Feb 2010 09:02:37 +0000 (09:02 -0000)
issues with catalyst stage1 due to PATH being unset and bzip2/tar binaries
not being found by bash.

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

pym/_emerge/BinpkgExtractorAsync.py

index 9e799443d61806c873aca6820cc36dbcaefd94e0..d9416643a2f2a81aff54cc8d1f73120f64fb6344 100644 (file)
@@ -3,13 +3,9 @@
 # $Id$
 
 from _emerge.SpawnProcess import SpawnProcess
-try:
-       import portage
-except ImportError:
-       from os import path as osp
-       import sys
-       sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
-       import portage
+import portage
+import os
+
 class BinpkgExtractorAsync(SpawnProcess):
 
        __slots__ = ("image_dir", "pkg", "pkg_path")
@@ -28,6 +24,5 @@ class BinpkgExtractorAsync(SpawnProcess):
                        (portage._shell_quote(self.pkg_path),
                        portage._shell_quote(self.image_dir))]
 
-               self.env = self.pkg.root_config.settings.environ()
+               self.env = os.environ.copy()
                SpawnProcess._start(self)
-