summaryrefslogtreecommitdiff
path: root/bin/just-mr.py
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2022-04-21 16:21:18 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2022-04-21 16:21:18 +0200
commit2510afb631f41ab49c74edc7938330d0003e808b (patch)
tree6a5dd199f5d165c647064b364c2d1cec17eababe /bin/just-mr.py
parent3ea705c630b438fd6513fd6190190a559060f341 (diff)
downloadjustbuild-2510afb631f41ab49c74edc7938330d0003e808b.tar.gz
just-mr: correctly set times and permissions in CAS
Diffstat (limited to 'bin/just-mr.py')
-rwxr-xr-xbin/just-mr.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/just-mr.py b/bin/just-mr.py
index 7b68eb19..1a1c868c 100755
--- a/bin/just-mr.py
+++ b/bin/just-mr.py
@@ -200,7 +200,9 @@ def add_to_cas(data):
with open(tempname, "wb") as f:
f.write(data)
f.flush()
+ os.chmod(f.fileno(), 0o444)
os.fsync(f.fileno())
+ os.utime(tempname, (0,0))
os.rename(tempname, target)
return target