aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2015-06-02 16:02:43 -0500
committerAndy Doan <andy.doan@linaro.org>2015-06-02 16:02:43 -0500
commitec018483c2c9c255e73d176ba6aa32eaa280bf23 (patch)
tree2e9f935867f28778b68605b4c533b906b5aa3c1a
parent435ac7916f231472e8199fa588e25190d9e312b1 (diff)
downloadlinaro-android-gerrit-support-ec018483c2c9c255e73d176ba6aa32eaa280bf23.tar.gz
allow repo to be read-only in production
Our production code runs from the directory containing this repo, which means its needs write-access so it can create the cache file. By changing the cache file location, we are able to clean up our deployment slightly. Change-Id: I2555684a7b955728d2ea23e119143233927a8bc5
-rwxr-xr-xgit-gerrit-mirror1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-gerrit-mirror b/git-gerrit-mirror
index 60eec46..4b71317 100755
--- a/git-gerrit-mirror
+++ b/git-gerrit-mirror
@@ -139,6 +139,7 @@ def get_cached(get_func, get_params_array, cache_id=None, cache_ttl=120):
if cache_id is None:
cache_id = get_params_array[0]
cache_file = re.sub(r"[ :/?&]", "_", cache_id) + ".cache"
+ cache_file = os.path.join('/tmp', cache_file)
if os.path.exists(cache_file):
age = time.time() - os.stat(cache_file).st_mtime