X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=external%2Ffetch_sources.py;h=cd74622e49d44d643e49fd8820361357094e21f2;hb=febfbbc2e5fc43b03fe0924ca6e129bc66975170;hp=eba0492f96256dff3a36bb1512ed5f57bd3bc87d;hpb=d2463ea3c82202b95ac997a5d15442e247f4974f;p=platform%2Fupstream%2FVK-GL-CTS.git diff --git a/external/fetch_sources.py b/external/fetch_sources.py index eba0492..cd74622 100644 --- a/external/fetch_sources.py +++ b/external/fetch_sources.py @@ -28,6 +28,7 @@ import hashlib import argparse import subprocess import ssl +import stat sys.path.append(os.path.join(os.path.dirname(__file__), "..", "scripts")) @@ -38,6 +39,10 @@ EXTERNAL_DIR = os.path.realpath(os.path.normpath(os.path.dirname(__file__))) def computeChecksum (data): return hashlib.sha256(data).hexdigest() +def onReadonlyRemoveError (func, path, exc_info): + os.chmod(path, stat.S_IWRITE) + os.unlink(path) + class Source: def __init__(self, baseDir, extractDir): self.baseDir = baseDir @@ -45,6 +50,10 @@ class Source: def clean (self): fullDstPath = os.path.join(EXTERNAL_DIR, self.baseDir, self.extractDir) + # Remove read-only first + readonlydir = os.path.join(fullDstPath, ".git", "objects", "pack") + if os.path.exists(readonlydir): + shutil.rmtree(readonlydir, onerror = onReadonlyRemoveError ) if os.path.exists(fullDstPath): shutil.rmtree(fullDstPath, ignore_errors=False) @@ -248,7 +257,7 @@ PACKAGES = [ GitRepo( "https://github.com/KhronosGroup/glslang.git", None, - "a5c5fb61180e8703ca85f36d618f98e16dc317e2", + "4f54c0c487238d576255a50c821387c13b0d040b", "glslang"), GitRepo( "https://github.com/KhronosGroup/SPIRV-Headers.git",