From: Zac Medico Date: Wed, 21 Jun 2006 02:50:07 +0000 (-0000) Subject: Log parallel-fetch output to /var/log/emerge-fetch.log just in case it's needed ... X-Git-Tag: v2.1-r1~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=21383934708fe77241eeb74dba0106b38e55a913;p=portage.git Log parallel-fetch output to /var/log/emerge-fetch.log just in case it's needed (see bug #137105). This patch is from trunk r3525 and r3526. svn path=/main/branches/2.1/; revision=3569 --- diff --git a/bin/emerge b/bin/emerge index 86ded28d9..fce95547a 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1936,10 +1936,15 @@ class depgraph: sys.stdout.close() sys.stderr.close() time.sleep(3) # allow the parent to have first fetch - sys.stdout = open("/dev/null","w") - sys.stderr = open("/dev/null","w") + fetchlog = "/var/log/emerge-fetch.log" + sys.stdout = open(fetchlog, "w") + sys.stderr = sys.stdout os.dup2(sys.stdout.fileno(), 1) - os.dup2(sys.stdout.fileno(), 2) + os.dup2(sys.stderr.fileno(), 2) + portage_util.apply_secpass_permissions(fetchlog, + uid=portage.portage_uid, gid=portage.portage_gid, + mode=0660) + # wipe the mtimedb so that portage doesn't attempt to flush it. # do not convert this code away from a fork without correcting this. portage.mtimedb = None