[PC-BSD Commits] r13320 - pcbsd/current/src-sh/pbi-manager
svn at pcbsd.org
svn at pcbsd.org
Wed Oct 12 10:20:10 PDT 2011
Author: kris
Date: 2011-10-12 10:20:10 -0700 (Wed, 12 Oct 2011)
New Revision: 13320
Modified:
pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:
Add support for skipping port builds of ports which have already failed once. Port will be rebuilt if PBI_BUILDKEY
is bumped, or if the ports files get updated upstream
Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager 2011-10-12 16:53:05 UTC (rev 13319)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager 2011-10-12 17:20:10 UTC (rev 13320)
@@ -5381,6 +5381,9 @@
if [ -e "${_od}/build.log.bz2" ] ; then
rm "${_od}/build.log.bz2"
fi
+ if [ -e "${_od}/.failed-csum" ] ; then
+ rm ${_od}/.failed-csum
+ fi
# Move old PBIs to archived folder
oldVersion=`cat ${_od}/pbi-version 2>/dev/null`
@@ -5426,6 +5429,9 @@
bzip2 "${_od}/build.log"
else
+ # Save the md5sum of the ports directory
+ tar cvf - -C "${PORTSDIR}/${_mp}" . 2>/dev/null | md5 -q >${_od}/.failed-csum
+
echo "Failed" > "${_od}/pbi-result"
if [ ! -z "${PBI_AB_HELPS}" ] ; then
${PBI_AB_HELPS} "FAILED" "${_od}"
@@ -5855,6 +5861,15 @@
#echo "Checking $_port for rebuild in ${PBI_AB_OUTDIR}/$_cd with key of $_bk"
+ # Check if this is a failed port we should be skipping until its fixed
+ if [ -e "${PBI_AB_OUTDIR}/${_cd}/.failed-csum" ] ; then
+ _fcsum="`cat ${PBI_AB_OUTDIR}/${_cd}/.failed-csum`"
+ _ncsum="`tar cvf - -C "${PORTSDIR}/${_port}" . 2>/dev/null | md5 -q`"
+ if [ "$_fcsum" != "$_ncsum" ] ; then
+ return 1
+ fi
+ fi
+
# See if we have an existing PBI
ls ${PBI_AB_OUTDIR}/${_cd}/*.pbi >/dev/null 2>/dev/null
if [ "${?}" != "0" ]; then
More information about the Commits
mailing list