Detect build failure in one of the build sets and act accordingly
svn path=/trunk/; revision=712
This commit is contained in:
parent
25d6214689
commit
9ce1595610
|
@ -2,6 +2,9 @@
|
|||
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
|
||||
# $Id$
|
||||
|
||||
02 Nov 2009; Andrew Gaffney <agaffney@gentoo.org> catalyst-auto:
|
||||
Detect build failure in one of the build sets and act accordingly
|
||||
|
||||
01 Jul 2009; Andrew Gaffney <agaffney@gentoo.org> catalyst-auto-hppa.conf:
|
||||
Switch hppa config to use build sets
|
||||
|
||||
|
|
|
@ -197,6 +197,8 @@ if ! run_cmd "catalyst -c ${CATALYST_CONFIG} -s ${DATESTAMP}" "${TMPDIR}/log/sna
|
|||
exit 1
|
||||
fi
|
||||
|
||||
build_failure=0
|
||||
|
||||
for a in "" ${SETS}; do
|
||||
if [ -z "${a}" ]; then
|
||||
specs_var="SPECS"
|
||||
|
@ -210,6 +212,7 @@ for a in "" ${SETS}; do
|
|||
LOGFILE="${TMPDIR}/log/$(echo "${i}" | sed -e 's:/:_:' -e 's:\.spec$::').log"
|
||||
run_cmd "catalyst -a -p -c ${CATALYST_CONFIG} -f ${i}" ${LOGFILE}
|
||||
if [ $? != 0 ]; then
|
||||
build_failure=1
|
||||
send_email "Catalyst fatal build error - ${i}" "" "${LOGFILE}"
|
||||
continue 2
|
||||
fi
|
||||
|
@ -219,6 +222,7 @@ for a in "" ${SETS}; do
|
|||
LOGFILE="${TMPDIR}/log/$(echo "${i}" | sed -e 's:/:_:' -e 's:\.spec$::').log"
|
||||
run_cmd "catalyst -a -p -c ${CATALYST_CONFIG} -f ${i}" ${LOGFILE}
|
||||
if [ $? != 0 ]; then
|
||||
build_failure=1
|
||||
send_email "Catalyst non-fatal build error - ${i}" "" "${LOGFILE}"
|
||||
break
|
||||
fi
|
||||
|
@ -236,11 +240,16 @@ if ! run_cmd "post_build" "${TMPDIR}/log/post_build.log"; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
send_email "Catalyst build success" "Build process complete."
|
||||
if [ ${build_failure} = 0 ]; then
|
||||
send_email "Catalyst build success" "Build process complete."
|
||||
|
||||
if [ "${keep_tmpdir}" = 0 ]; then
|
||||
if [ "${keep_tmpdir}" = 0 ]; then
|
||||
if ! rm -rf "${TMPDIR}"; then
|
||||
echo "Could not remove tmpdir ${TMPDIR}!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
else
|
||||
send_email "Catalyst build complete, but with errors" "Build process has completed, but there were errors. Please consult previous emails to determine the problem."
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue