summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-11 21:58:06 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-11 21:58:06 +0000
commitb232f7bb85a9ef1db3fcd37dbac330d1134a05b0 (patch)
tree2be361d8e2dc7043b316d389881bd39cd90aadd8
parent02a87dfe07af991aa85762476fddfec57bd6e108 (diff)
downloadportage-b232f7bb85a9ef1db3fcd37dbac330d1134a05b0.tar.gz
portage-b232f7bb85a9ef1db3fcd37dbac330d1134a05b0.tar.bz2
portage-b232f7bb85a9ef1db3fcd37dbac330d1134a05b0.zip
Make file_get() redirect FETCHCOMMAND output to stdout just like
portage.fetch() does. Thanks to Ramereth for reporting. svn path=/main/trunk/; revision=9844
-rw-r--r--pym/portage/getbinpkg.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/portage/getbinpkg.py b/pym/portage/getbinpkg.py
index 9e03b1f0e..5ace5b0b6 100644
--- a/pym/portage/getbinpkg.py
+++ b/pym/portage/getbinpkg.py
@@ -398,7 +398,12 @@ def file_get(baseurl,dest,conn=None,fcmd=None):
lexer = shlex.shlex(StringIO.StringIO(fcmd), posix=True)
lexer.whitespace_split = True
myfetch = [varexpand(x, mydict=variables) for x in lexer]
- retval = spawn(myfetch, env=os.environ.copy())
+ fd_pipes= {
+ 0:sys.stdin.fileno(),
+ 1:sys.stdout.fileno(),
+ 2:sys.stdout.fileno()
+ }
+ retval = spawn(myfetch, env=os.environ.copy(), fd_pipes=fd_pipes)
if retval != os.EX_OK:
sys.stderr.write("Fetcher exited with a failure condition.\n")
return 0