[PC-BSD Commits] r18041 - pcbsd/current/src-sh/pbi-manager
svn at pcbsd.org
svn at pcbsd.org
Wed Aug 1 07:29:56 PDT 2012
Author: kris
Date: 2012-08-01 14:29:56 +0000 (Wed, 01 Aug 2012)
New Revision: 18041
Modified:
pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:
Add some internal priorities to PBI building, we can do minor port
rev bumps until last, get real program bumps first
Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager 2012-08-01 14:06:01 UTC (rev 18040)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager 2012-08-01 14:29:56 UTC (rev 18041)
@@ -5468,6 +5468,7 @@
AB_FOUND="0"
unset CUR_PRIORITY_PBI CUR_WORKING_PBI
+ cd "${PBI_AB_CONFDIR}"
for pbi in `find . -type f -name "${PBI_CONFFILE}" | grep -v '\.svn' | sort`
do
# Figure out the target port for this build
@@ -5511,22 +5512,24 @@
if [ -z "${CUR_PRIORITY_PBI}" ] ; then
CUR_WORKING_PBI="${pbi}"
if [ -z "$PBI_AB_PRIORITY" ] ; then
- CUR_PRIORITY_PBI="0"
+ CUR_PRIORITY_PBI="$internal_ab_priority"
else
- CUR_PRIORITY_PBI="$PBI_AB_PRIORITY"
+ CUR_PRIORITY_PBI=`eval $PBI_AB_PRIORITY + 10`
fi
continue
fi
- # No priority set, keep the previous build
- if [ -z "${PBI_AB_PRIORITY}" ] ; then continue ; fi
+ # Bump up the supplied AB priority
+ if [ -n "${PBI_AB_PRIORITY}" ] ; then
+ internal_ab_priority=`eval $PBI_AB_PRIORITY + 10`
+ fi
- if [ $CUR_PRIORITY_PBI -lt $PBI_AB_PRIORITY ] ; then
+ # Check if this PBI is a higher priority
+ if [ $CUR_PRIORITY_PBI -lt $internal_ab_priority ] ; then
CUR_WORKING_PBI="${pbi}"
- CUR_PRIORITY_PBI="$PBI_AB_PRIORITY"
+ CUR_PRIORITY_PBI="$internal_ab_priority"
continue
fi
-
continue
fi
@@ -6108,15 +6111,17 @@
_bk="$2"
_cd="$3"
local _abkey="$4"
-
+ internal_ab_priority=1
unset PBI_PROGVERSION
- get_pbi_progversion
# 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`" != "$_bk" \
- -a -n "${_bk}" ]
- then echo "BUILDKEY bump, rebuild triggered." ; return 0 ; fi
+ -a -n "${_bk}" ]; then
+ echo "BUILDKEY bump, rebuild triggered."
+ internal_ab_priority=9
+ return 0
+ fi
fi
# Make sure this PBI hasn't already failed during this run
@@ -6141,18 +6146,31 @@
ls ${PBI_AB_OUTDIR}/${_cd}/*.pbi >/dev/null 2>/dev/null
if [ "${?}" != "0" ]; then
#echo "No existing PBI"
+ internal_ab_priority=8
return 0
fi
# See if we have a saved version
if [ ! -e "${PBI_AB_OUTDIR}/${_cd}/pbi-version" ]; then
#echo "No saved pbi-version"
+ internal_ab_priority=7
return 0
fi
+ # Get the programs port version
+ get_pbi_progversion
+
# See if the version is different now
oldVersion=`cat ${PBI_AB_OUTDIR}/${_cd}/pbi-version`
if [ "$oldVersion" != "$PBI_PROGVERSION" ]; then
+ local oldPortVer=`echo $oldVersion | rev | cut -d '_' -f 2- | rev`
+ if [ "$PORTVER" = "$oldPortVer" ] ; then
+ # Just a minor portrev bump
+ internal_ab_priority=2
+ else
+ # Real version change
+ internal_ab_priority=3
+ fi
echo "$_port version bump: $oldVersion -> $PBI_PROGVERSION"
return 0
fi
More information about the Commits
mailing list