summaryrefslogtreecommitdiffstats
path: root/pym/portage/__init__.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-20 02:40:33 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-20 02:40:33 +0000
commit68e08c0e8da12147e84938f59e72fbb93014120a (patch)
treea2918ec357a13def4e63a796e8f87f7f3caade73 /pym/portage/__init__.py
parent273b8f499f2e24b840f1efe96c63892d3919a009 (diff)
downloadportage-68e08c0e8da12147e84938f59e72fbb93014120a.tar.gz
portage-68e08c0e8da12147e84938f59e72fbb93014120a.tar.bz2
portage-68e08c0e8da12147e84938f59e72fbb93014120a.zip
Bug #247370 - Use a private PORTAGE_TMPDIR for --fetchonly mode in order
do avoid locking the normal build dir location (similar to bug #245231). The EbuildFetchPretend class is renamed to EbuildFetchonly and it's used for --fetchonly mode regardless of whether --pretend is enabled. Also, fix stdout/stderr flushing in JobStatusDisplay.displayMessage() and portage.spawn() to ensure output always occurs in the correct order when displaying pkg_nofetch() output in --fetchonly mode. (trunk r12006) svn path=/main/branches/2.1.6/; revision=12007
Diffstat (limited to 'pym/portage/__init__.py')
-rw-r--r--pym/portage/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 3415f5760..6c369efbb 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -3046,11 +3046,12 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakero
# In some cases the above print statements don't flush stdout, so
# it needs to be flushed before allowing a child process to use it
# so that output always shows in the correct order.
+ stdout_filenos = (sys.stdout.fileno(), sys.stderr.fileno())
for fd in fd_pipes.itervalues():
- if fd == sys.stdout.fileno():
+ if fd in stdout_filenos:
sys.stdout.flush()
- if fd == sys.stderr.fileno():
sys.stderr.flush()
+ break
# The default policy for the sesandbox domain only allows entry (via exec)
# from shells and from binaries that belong to portage (the number of entry