For bug #185930, direct all FETCHCOMMAND output to stdout.
authorZac Medico <zmedico@gentoo.org>
Sat, 21 Jul 2007 04:20:15 +0000 (04:20 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 21 Jul 2007 04:20:15 +0000 (04:20 -0000)
svn path=/main/trunk/; revision=7330

pym/portage/__init__.py

index 4494caeb2319182be08ecda16a732cfa0e5b8e96..8f0b2205f6602d8b781173477703585d4cd10405 100644 (file)
@@ -2839,6 +2839,14 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
                                        myfetch = [varexpand(x, mydict=variables) for x in lexer]
 
                                        spawn_keywords = {}
+                                       # Redirect all output to stdout since some fetchers like
+                                       # wget pollute stderr (if portage detects a problem then it
+                                       # can send it's own message to stderr).
+                                       spawn_keywords["fd_pipes"] = {
+                                               0:sys.stdin.fileno(),
+                                               1:sys.stdout.fileno(),
+                                               2:sys.stdout.fileno()
+                                       }
                                        if "userfetch" in mysettings.features and \
                                                os.getuid() == 0 and portage_gid and portage_uid:
                                                spawn_keywords.update({