runqueue.py: Flush stdout/stderr before forking to fix duplicate console output
authorRichard Purdie <rpurdie@linux.intel.com>
Fri, 9 May 2008 10:12:27 +0000 (10:12 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 9 May 2008 10:12:27 +0000 (10:12 +0000)
ChangeLog
lib/bb/runqueue.py

index 716e846..0011bb9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,7 @@ Changes in BitBake 1.8.x:
          checking stamp dependencies and using a BB_STAMP_POLICY of "whitelist"
        - No longer weight providers on the basis of a package being "already staged". This
          leads to builds being non-deterministic.
+       - Flush stdout/stderr before forking to fix duplicate console output
 
 Changes in BitBake 1.8.10:
        - Psyco is available only for x86 - do not use it on other architectures.
index b9c1399..3665ef5 100644 (file)
@@ -916,6 +916,8 @@ class RunQueue:
                     continue
 
                 bb.msg.note(1, bb.msg.domain.RunQueue, "Running task %d of %d (ID: %s, %s)" % (self.stats.completed + self.active_builds + 1, len(self.runq_fnid), task, self.get_user_idstring(task)))
+                sys.stdout.flush()
+                sys.stderr.flush()
                 try: 
                     pid = os.fork() 
                 except OSError, e: