Run build on three branches. Check the status file filled out by

dopackages and abort build if there were any errors.  It intentionally
leaves lock files behind in that case because it usually requires my
manual intervention to fix whatever's wrong (usually a botched INDEX
build due to someone forgetting to update dependency lines) and we
don't want subsequent failed tries to wipe out all the good packages
and distfiles we have accumulated.
This commit is contained in:
Satoshi Asami 2000-08-29 08:21:47 +00:00
parent a88f6b297c
commit 04694e8990
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=32085

View File

@ -5,23 +5,59 @@ pb=/a/asami/portbuild
mailto=asami@freebsd.org
lock=${pb}/lock
status=${pb}/status
date=$(date '+%Y%m%d')
if [ -e ${lock} ]; then
echo "Skipped package build since lock file exists" | sendmail $mailto
# echo "Skipped package build since lock file exists" | sendmail $mailto
exit 1
fi
touch ${lock}
rm -f ${status}
mkdir -p ${pb}/archive/buildlogs
if [ -f ${pb}/scripts/dopackages.new ]; then
mv -f ${pb}/scripts/dopackages.new ${pb}/scripts/dopackages
fi
ln -sf ${pb}/archive/buildlogs/log.4.${date} ${pb}/4/build.log
${pb}/scripts/dopackages 4 2>&1 \
${pb}/scripts/dopackages $@ 4 ${date} 2>&1 \
| tee ${pb}/archive/buildlogs/log.4.${date} \
| sendmail $mailto
if [ -f ${status} ]; then
exit "$(cat ${status})"
fi
if [ -f ${pb}/scripts/dopackages.new ]; then
mv -f ${pb}/scripts/dopackages.new ${pb}/scripts/dopackages
fi
ln -sf ${pb}/archive/buildlogs/log.5.${date} ${pb}/5/build.log
${pb}/scripts/dopackages -nocvsup $@ 5 ${date} 2>&1 \
| tee ${pb}/archive/buildlogs/log.5.${date} \
| sendmail $mailto
if [ -f ${status} ]; then
exit "$(cat ${status})"
fi
if [ -f ${pb}/scripts/dopackages.new ]; then
mv -f ${pb}/scripts/dopackages.new ${pb}/scripts/dopackages
fi
ln -sf ${pb}/archive/buildlogs/log.3.${date} ${pb}/3/build.log
${pb}/scripts/dopackages -nocvsup 3 2>&1 \
${pb}/scripts/dopackages -nocvsup $@ 3 ${date} 2>&1 \
| tee ${pb}/archive/buildlogs/log.3.${date} \
| sendmail $mailto
if [ -f ${status} ]; then
exit "$(cat ${status})"
fi
cd ${pb}/archive/errorlogs/e.3.${date} && ${pb}/scripts/processlogs
cd ${pb}/archive/errorlogs/e.4.${date} && ${pb}/scripts/processlogs
cd ${pb}/archive/errorlogs/e.5.${date} && ${pb}/scripts/processlogs
cd ${pb}/archive/errorlogs
${pb}/scripts/comparelogs e.3.${date} e.4.${date}
${pb}/scripts/comparelogs e.4.${date} e.3.${date}
${pb}/scripts/comparelogs e.5.${date} e.4.${date}
${pb}/scripts/comparelogs e.4.${date} e.5.${date}
${pb}/scripts/bothlogs e.3.${date} e.4.${date} e.5.${date}
rm -f ${lock}