Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 126277 Details for
Bug 186876
Out of pty devices after checksums validation during gentoo installation
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fall back it os.pipe() if pty.openpty() fails
no_pty.patch (text/plain), 1.24 KB, created by
Zac Medico
on 2007-07-28 22:54:48 UTC
(
hide
)
Description:
fall back it os.pipe() if pty.openpty() fails
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2007-07-28 22:54:48 UTC
Size:
1.24 KB
patch
obsolete
>Index: pym/portage.py >=================================================================== >--- pym/portage.py (revision 7422) >+++ pym/portage.py (revision 7423) >@@ -2332,6 +2332,7 @@ > master_fd = None > slave_fd = None > fd_pipes_orig = None >+ got_pty = False > if logfile: > del keywords["logfile"] > fd_pipes = keywords.get("fd_pipes") >@@ -2340,10 +2341,16 @@ > elif 1 not in fd_pipes or 2 not in fd_pipes: > raise ValueError(fd_pipes) > from pty import openpty >- master_fd, slave_fd = openpty() >+ try: >+ master_fd, slave_fd = openpty() >+ got_pty = True >+ except EnvironmentError, e: >+ writemsg("openpty failed: '%s'\n" % str(e), noiselevel=1) >+ del e >+ master_fd, slave_fd = os.pipe() > fd_pipes.setdefault(0, sys.stdin.fileno()) > fd_pipes_orig = fd_pipes.copy() >- if os.isatty(fd_pipes_orig[1]): >+ if got_pty and os.isatty(fd_pipes_orig[1]): > from output import get_term_size, set_term_size > rows, columns = get_term_size() > set_term_size(rows, columns, slave_fd) >@@ -2398,7 +2405,7 @@ > if logfile: > log_file = open(logfile, 'a') > stdout_file = os.fdopen(os.dup(fd_pipes_orig[1]), 'w') >- master_file = os.fdopen(master_fd, 'w+') >+ master_file = os.fdopen(master_fd, 'r') > iwtd = [master_file] > owtd = [] > ewtd = []
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 186876
:
126215
|
126217
| 126277