summaryrefslogtreecommitdiff
path: root/infra/dgit-mirror-rsync
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-07-14 17:23:37 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-07-14 17:23:40 +0100
commitb38d6d36f43ef8ac41a937cacbdb7e3ae5535a5a (patch)
tree9ef2c8cd8e56411861cb0a6420e66226e934fc75 /infra/dgit-mirror-rsync
parent3471e600b5d2b3910a46c37dbd0969bbf304a559 (diff)
infrastructure: Run git gc --auto before mirroring. Closes:#841414.
This would not have avoided the trouble reported here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841414#74 Empirically, I managed to work around the problem by running `git gc' (rather than `git gc --auto') and then rsyncing the result to the mirror. I will request that DSA increase the RAM (or swap) size on the relevant host. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'infra/dgit-mirror-rsync')
-rwxr-xr-xinfra/dgit-mirror-rsync7
1 files changed, 7 insertions, 0 deletions
diff --git a/infra/dgit-mirror-rsync b/infra/dgit-mirror-rsync
index 9346489..2d912c8 100755
--- a/infra/dgit-mirror-rsync
+++ b/infra/dgit-mirror-rsync
@@ -54,6 +54,7 @@ rsync=(rsync -rltH --safe-links --delete)
hooktimeout=30
rsynctimeout=900
rsyncssh='ssh -o batchmode=yes'
+mirror_gc_cmd='git gc --auto'
. $distrodir/mirror-settings
@@ -74,6 +75,12 @@ case "$remoterepos" in
esac
actually () {
+ if [ "x$mirror_gc_cmd" != x ]; then
+ (
+ cd "$repos/$package.git"
+ $mirror_gc_cmd
+ )
+ fi
"${rsync[@]}" \
--timeout=$rsynctimeout \
-e "$rsyncssh" \