pkgsrc/pkgtools/tinderbox-dragonfly/files/bulk_hook_1.sh.in
marino 04619e863e pkgtools/tinderbox-dragonfly: Minor fixes
1) Bulk Build: don't add ports where there's no makefile present (x2)
2) Make hook processing more robust (g option on regex, check for
   non-empty string value)
3) Make enterBuild function work with HOST_WKRDIRS option
4) Handle specific DEPENDS+= case for perl where the addition of the
   dependency port is conditional on the version of perl used.
   This addresses the infinite loop case seen on some perl packages
2011-12-04 21:55:01 +00:00

41 lines
1.2 KiB
Bash

#/bin/sh
#
# Bulk Build, PostPortBuild Hook
# When executed, this hook will remove the built port from the
# ${BULKTMP}/bulk_${BUILD}.queue. If the built port matches
# the ${BULKTMP}/bulk_${BUILD}.active file, then the nextport
# on the bulk build will be added to the queue.
#
PB=@TINROOT@
BULKTMP=/tmp
if [ -z "{BUILD}" ]; then
echo "BUILD envvar not defined."
exit
fi
if [ -z "{PORTDIR}" ]; then
echo "PORTDIR envvar not defined."
exit
fi
echo "${PORTDIR} (${PACKAGE_NAME}: ${STATUS})" >> ${BULKTMP}/bulk_${BUILD}.processed
QLIST=`${PB}/scripts/tc listBuildPortsQueue -b ${BUILD} | grep " ${PORTDIR} "`
if [ -n "${QLIST}" ]; then
${PB}/scripts/tc rmBuildPortsQueueEntry -b ${BUILD} -d ${PORTDIR}
fi
SPORTDIR=`echo ${PORTDIR} | sed "s|/|\\\\\\/|g"`
if [ -n "${SPORTDIR}" ]; then
sed "/^${SPORTDIR}\$/d" ${BULKTMP}/bulk_${BUILD}.queue > ${BULKTMP}/bulk_${BUILD}.queue.tmp
mv ${BULKTMP}/bulk_${BUILD}.queue.tmp ${BULKTMP}/bulk_${BUILD}.queue
fi
if [ -f ${BULKTMP}/bulk_${BUILD}.active ]; then
ACTIVEPORT=`cat ${BULKTMP}/bulk_${BUILD}.active`
if [ "${ACTIVEPORT}" = "${PORTDIR}" ]; then
rm ${BULKTMP}/bulk_${BUILD}.active
${PB}/scripts/contrib/bulk/bulkbuild.sh nextport ${BUILD}
fi
fi