When spawing the "depend" phase, use file descriptors from sys.std*
authorZac Medico <zmedico@gentoo.org>
Tue, 8 Jan 2008 04:56:31 +0000 (04:56 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 8 Jan 2008 04:56:31 +0000 (04:56 -0000)
streams.

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

pym/portage/__init__.py

index a9d430071522732d712cb0e98bb48cf90a8d8b91..c56286069fcbace9b1d0c246f451bace29d3743d 100644 (file)
@@ -4394,7 +4394,11 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
                        if isinstance(dbkey, dict):
                                mysettings["dbkey"] = ""
                                pr, pw = os.pipe()
-                               fd_pipes = {0:0, 1:1, 2:2, 9:pw}
+                               fd_pipes = {
+                                       0:sys.stdin.fileno(),
+                                       1:sys.stdout.fileno(),
+                                       2:sys.stderr.fileno(),
+                                       9:pw}
                                mypids = spawn(_shell_quote(ebuild_sh_binary) + " depend",
                                        mysettings,
                                        fd_pipes=fd_pipes, returnpid=True, droppriv=droppriv)