Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r14515 - main/trunk/pym/portage
Date: Wed, 07 Oct 2009 19:23:18
Message-Id: E1Mvc6W-0005ZA-Ni@stork.gentoo.org
1 Author: grobian
2 Date: 2009-10-07 19:23:16 +0000 (Wed, 07 Oct 2009)
3 New Revision: 14515
4
5 Modified:
6 main/trunk/pym/portage/__init__.py
7 Log:
8 merge disable openpty conditional from branches/prefix
9
10 Modified: main/trunk/pym/portage/__init__.py
11 ===================================================================
12 --- main/trunk/pym/portage/__init__.py 2009-10-07 19:19:22 UTC (rev 14514)
13 +++ main/trunk/pym/portage/__init__.py 2009-10-07 19:23:16 UTC (rev 14515)
14 @@ -3852,7 +3852,21 @@
15
16 # In some cases, openpty can be slow when it fails. Therefore,
17 # stop trying to use it after the first failure.
18 -_disable_openpty = False
19 +if platform.system() not in ["Linux"]:
20 + # Disable the use of openpty on Solaris as it seems Python's openpty
21 + # implementation doesn't play nice on Solaris with Portage's
22 + # behaviour causing hangs/deadlocks.
23 + # Disable on Darwin also, it used to work fine, but since the
24 + # introduction of _test_pty_eof Portage hangs (on the
25 + # slave_file.close()) indicating some other problems with openpty on
26 + # Darwin there
27 + # On AIX, haubi reported that the openpty code doesn't work any
28 + # longer since the introduction of _test_pty_eof either.
29 + # Looks like Python's openpty module is too fragile to use on UNIX,
30 + # so only use it on Linux
31 + _disable_openpty = True
32 +else:
33 + _disable_openpty = False
34 _tested_pty = False
35
36 def _create_pty_or_pipe(copy_term_size=None):