diff options
-rwxr-xr-x | infra/dgit-mirror-rsync | 4 | ||||
-rw-r--r-- | tests/lib-mirror | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/infra/dgit-mirror-rsync b/infra/dgit-mirror-rsync index 47142ee..0d29ffb 100755 --- a/infra/dgit-mirror-rsync +++ b/infra/dgit-mirror-rsync @@ -108,7 +108,11 @@ attempt () { exec 3>&2 >"$queue/$package.err" 2>&1 if actually; then rm -f "$queue/$package.a" + exec 2>&3 2>&1 mv -f "$queue/$package.err" "$queue/$package.log" + if ! [ -s "$queue/$package.log" ]; then + rm "$queue/$package.log" + fi rm "$queue/$package.lock" else cat >&3 "$queue/$package.err" diff --git a/tests/lib-mirror b/tests/lib-mirror index c84c30c..a61e02b 100644 --- a/tests/lib-mirror +++ b/tests/lib-mirror @@ -29,7 +29,7 @@ t-check-mirrored () { t-reporefs master t-reporefs mirror $pmirror diff $tmp/show-refs.{master,mirror} - cat $queuedir/$p.log + cat $queuedir/$p.log ||: t-files-notexist $queuedir/$p.{n,a,lock,err} } |