diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-09-22 18:40:32 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-09-22 18:40:32 +0000 |
commit | d204f56015eba60cb7f219ecce54d730b3e18051 (patch) | |
tree | bb5f84f33f24506994b69b19a87a0570a858bc18 | |
parent | c79e2c7c841e3175a4f1b10c8cde8f73f3d10fe7 (diff) | |
download | portage-d204f56015eba60cb7f219ecce54d730b3e18051.tar.gz portage-d204f56015eba60cb7f219ecce54d730b3e18051.tar.bz2 portage-d204f56015eba60cb7f219ecce54d730b3e18051.zip |
Flush stdout before calling pkg_info() to ensure that output always shows in the correct order.
svn path=/main/trunk/; revision=7794
-rw-r--r-- | pym/emerge/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 652a3d355..d11143d26 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -5400,6 +5400,10 @@ def action_info(settings, trees, myopts, myfiles): if not ebuildpath or not os.path.exists(ebuildpath): out.ewarn("No ebuild found for '%s'" % pkg) continue + # 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. + sys.stdout.flush() portage.doebuild(ebuildpath, "info", pkgsettings["ROOT"], pkgsettings, debug=(settings.get("PORTAGE_DEBUG", "") == 1), mydbapi=trees[settings["ROOT"]]["vartree"].dbapi, |