From: Eric Engestrom Date: Thu, 29 Jun 2017 16:21:44 +0000 (+0100) Subject: scons: wait on subprocess' completion X-Git-Tag: upstream/18.1.0~8181 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f6110ad327275fecc68248c1d6bd85f6b3d111c;p=platform%2Fupstream%2Fmesa.git 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 Signed-off-by: Eric Engestrom --- diff --git a/src/SConscript b/src/SConscript index 5e1171b..c31e4ec 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