[PC-BSD Commits] r7843 - pcbsd/current/src-sh/pbi-manager
svn at pcbsd.org
svn at pcbsd.org
Sat Oct 16 06:20:53 PDT 2010
Author: kris
Date: 2010-10-16 06:20:53 -0700 (Sat, 16 Oct 2010)
New Revision: 7843
Modified:
pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:
Cleanup checker that figures out if we need to rebuild a PBI
Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager 2010-10-16 13:04:45 UTC (rev 7842)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager 2010-10-16 13:20:53 UTC (rev 7843)
@@ -3844,19 +3844,30 @@
_cd="$3"
get_pbi_progversion
+ echo "Checking $_port for rebuild in ${PBI_AB_OUTDIR}/$_cd with key of $_bk"
+
# See if we have an existing PBI
ls ${PBI_AB_OUTDIR}/${_cd}/*.pbi >/dev/null 2>/dev/null
- if [ "${?}" != "0" ]; then return 0 ; fi
+ if [ "${?}" != "0" ]; then echo "No existing PBI" ; return 0 ; fi
+ # See if we have a saved version
+ if [ ! -e "${PBI_AB_OUTDIR}/${_cd}/pbi-version" ]; then
+ echo "No saved pbi-version"
+ return 0
+ fi
+
# See if the version is different now
- if [ ! -e "${PBI_AB_OUTDIR}/${_cd}/pbi-version" ]; then return 0 ; fi
- if [ "$(cat ${PBI_AB_OUTDIR}/${_cd}/pbi-version)" != "$PBI_PROGVERSION" ]; then return 0 ; fi
+ oldVersion=`cat ${PBI_AB_OUTDIR}/${_cd}/pbi-version`
+ if [ "$oldVersion" != "$PBI_PROGVERSION" ]; then
+ echo "Version bump: $oldVersion -> $PBI_PROGVERSION"
+ return 0
+ fi
# Lastly check PBI_BUILDKEY, see if we have a manual rebuild triggered
if [ -e "$PBI_AB_OUTDIR}/${_cd}/pbi-buildkey" ] ; then
if [ "$(cat ${PBI_AB_OUTDIR}/${_cd}/pbi-buildkey)" != "$PBI_BUILDKEY" \
-a ! -z "${PBI_BUILDKEY}" ]
- then return 0 ; fi
+ then echo "BUILDKEY bump, rebuild triggered." ; return 0 ; fi
fi
return 1
More information about the Commits
mailing list