]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake/runqueue.py: Ensure the flush happens as late as possible to avoid data mixups
authorRichard Purdie <rpurdie@linux.intel.com>
Thu, 19 Aug 2010 22:39:19 +0000 (23:39 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Thu, 19 Aug 2010 22:39:19 +0000 (23:39 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/runqueue.py

index 82d6c84c0bb831efd6462868ed2b5519c080ea90..67f265bc80827eccfe09110c79d572cff7a4d7e4 100644 (file)
@@ -990,9 +990,6 @@ class RunQueueExecute:
         return
 
     def fork_off_task(self, fn, task, taskname):
-        sys.stdout.flush()
-        sys.stderr.flush()
-
         try:
             the_data = self.cooker.bb_cache.loadDataFull(fn, self.cooker.get_file_appends(fn), self.cooker.configuration.data)
 
@@ -1005,6 +1002,9 @@ class RunQueueExecute:
                     comps = var.split("=")
                     env[comps[0]] = comps[1]
 
+            sys.stdout.flush()
+            sys.stderr.flush()
+
             proc = subprocess.Popen(["bitbake-runtask", fn, taskname, str(self.cooker.configuration.dry_run)], env=env, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
             pipein = proc.stdout
             pipeout = proc.stdin