Mesa (master): scons: fix write_git_sha1_h_file() issue on Windows
Brian Paul
brianp at kemper.freedesktop.org
Wed Sep 28 15:07:11 UTC 2011
Module: Mesa
Branch: master
Commit: e112287474e225969fb10e6bc744d9c48a853fc6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e112287474e225969fb10e6bc744d9c48a853fc6
Author: Brian Paul <brianp at vmware.com>
Date: Wed Sep 28 09:04:03 2011 -0600
scons: fix write_git_sha1_h_file() issue on Windows
Unlike on Unix, os.rename(src, dst) will fail on Windows if the dst file
already exists. Remove it first.
---
src/mesa/SConscript | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index 595f8fc..3d5d37a 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -488,6 +488,8 @@ def write_git_sha1_h_file(filename):
if not os.path.exists(filename) or not filecmp.cmp(tempfile, filename):
# The filename does not exist or it's different from the new file,
# so replace old file with new.
+ if os.path.exists(filename):
+ os.remove(filename)
os.rename(tempfile, filename)
return
More information about the mesa-commit
mailing list