You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2019/10/10 06:52:43 UTC
svn commit: r1868223 -
/spamassassin/trunk/backend/nitemc/extract_to_rsync_dir
Author: hege
Date: Thu Oct 10 06:52:42 2019
New Revision: 1868223
URL: http://svn.apache.org/viewvc?rev=1868223&view=rev
Log:
Only update tagged build dir if mkrules/lint is successful
Modified:
spamassassin/trunk/backend/nitemc/extract_to_rsync_dir
Modified: spamassassin/trunk/backend/nitemc/extract_to_rsync_dir
URL: http://svn.apache.org/viewvc/spamassassin/trunk/backend/nitemc/extract_to_rsync_dir?rev=1868223&r1=1868222&r2=1868223&view=diff
==============================================================================
--- spamassassin/trunk/backend/nitemc/extract_to_rsync_dir (original)
+++ spamassassin/trunk/backend/nitemc/extract_to_rsync_dir Thu Oct 10 06:52:42 2019
@@ -38,19 +38,23 @@ for retry in 1 2 3 4 5 6 7 8 9 10 ; do
# sleep on retries
if [ $retry -gt 1 ]; then sleep 60; fi
- # export the main repo:
- rm -rf $RSYNC_DIR/$subdir/*
- $SVN export --non-interactive --force -r $REV $REPO_URL $RSYNC_DIR/$subdir/ \
+ # export the main repo: (through a temporary dir)
+ rm -rf $RSYNC_DIR/${subdir}.tmp
+ mkdir $RSYNC_DIR/${subdir}.tmp || continue
+ $SVN export --non-interactive --force -r $REV $REPO_URL $RSYNC_DIR/${subdir}.tmp/ \
|| continue
- cd $RSYNC_DIR/$subdir
+ cd $RSYNC_DIR/${subdir}.tmp
$PERL build/mkrules --out rules > /dev/null || continue
-
# create "svn info" file for mass-check
- $SVN info $REPO_URL > masses/svninfo.tmp \
- < /dev/null || continue
+ $SVN info $REPO_URL > masses/svninfo.tmp < /dev/null || continue
- exit # assume success at this point
+ cd $RSYNC_DIR
+ # Success, only now install directory in place
+ rm -rf $RSYNC_DIR/${subdir}.old &&
+ mv -f $RSYNC_DIR/${subdir} $RSYNC_DIR/${subdir}.old &&
+ mv -f $RSYNC_DIR/${subdir}.tmp $RSYNC_DIR/${subdir} &&
+ exit
done
echo "FAILED to extract to rsync dir" 1>&2