Mesa (master): build: Don't bail on OSError in git_sha1_gen.py
Eric Engeström
eric_engestrom at kemper.freedesktop.org
Wed Aug 2 13:29:30 UTC 2017
Module: Mesa
Branch: master
Commit: 44828e99f9b5f04f8e2f19dd671de4d67ee1f595
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=44828e99f9b5f04f8e2f19dd671de4d67ee1f595
Author: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
Date: Wed Aug 2 03:05:42 2017 +0200
build: Don't bail on OSError in git_sha1_gen.py
When building sandboxed, we may encounter additional errors. Ignore the errors,
as we are in a constrained environment.
This can be observed when building latest git with OBS.
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
bin/git_sha1_gen.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/bin/git_sha1_gen.py b/bin/git_sha1_gen.py
index 6d13db1e16..fe30084a4f 100755
--- a/bin/git_sha1_gen.py
+++ b/bin/git_sha1_gen.py
@@ -16,5 +16,8 @@ try:
except subprocess.CalledProcessError as e:
# don't print anything if git fails
pass
+except OSError as eos:
+ # don't fail on inaccessible files when sandboxed
+ pass
else:
sys.stdout.write('#define MESA_GIT_SHA1 "git-%s"\n' % git_sha1.rstrip())
More information about the mesa-commit
mailing list