diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-04-11 21:58:31 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-04-11 21:58:31 +0000 |
commit | 99b38cfc8392dd1bf65418e51a449abe5a85373a (patch) | |
tree | 5621de0d7f30ca981a5d4db1ade57df5e4d4820b /pym/getbinpkg.py | |
parent | 68df533704514a0c7539ee541786e29e15e7f1f9 (diff) | |
download | portage-99b38cfc8392dd1bf65418e51a449abe5a85373a.tar.gz portage-99b38cfc8392dd1bf65418e51a449abe5a85373a.tar.bz2 portage-99b38cfc8392dd1bf65418e51a449abe5a85373a.zip |
Make file_get() redirect FETCHCOMMAND output to stdout just like
portage.fetch() does. Thanks to Ramereth for reporting. (trunk r9844)
svn path=/main/branches/2.1.2/; revision=9845
Diffstat (limited to 'pym/getbinpkg.py')
-rw-r--r-- | pym/getbinpkg.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/getbinpkg.py b/pym/getbinpkg.py index d20a549ed..861e98dd8 100644 --- a/pym/getbinpkg.py +++ b/pym/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 |