Mesa (master): scons: wait on subprocess' completion

Eric Engeström eric_engestrom at kemper.freedesktop.org
Thu Jun 29 16:39:29 UTC 2017


Module: Mesa
Branch: master
Commit: 9f6110ad327275fecc68248c1d6bd85f6b3d111c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f6110ad327275fecc68248c1d6bd85f6b3d111c

Author: Eric Engestrom <eric.engestrom at imgtec.com>
Date:   Thu Jun 29 17:21:44 2017 +0100

scons: wait on subprocess' completion

Windows doesn't allow you to move a file that's opened, and Popen()
doesn't wait on its subprocess' completion before returning, which leads
to broken Windows build.

Fixes: 3fd425aed764fb771f2f "build systems: uniformize git_sha1.h generation"
Suggested-by: Scott D Phillips <scott.d.phillips at intel.com>
Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>

---

 src/SConscript | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/SConscript b/src/SConscript
index 5e1171b524..c31e4ec06f 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -26,7 +26,7 @@ def write_git_sha1_h_file(filename):
     with open(tempfile, "w") as f:
         args = [ 'sh', Dir('#').abspath + '/git_sha1_gen.sh' ]
         try:
-            subprocess.Popen(args, stdout=f)
+            subprocess.Popen(args, stdout=f).wait()
         except:
             print "Warning: exception in write_git_sha1_h_file()"
             return




More information about the mesa-commit mailing list