diff options
author | Kris Kennaway <kris@FreeBSD.org> | 2008-07-26 14:07:49 +0000 |
---|---|---|
committer | Kris Kennaway <kris@FreeBSD.org> | 2008-07-26 14:07:49 +0000 |
commit | 316ad2a0a7bc5f61e8a0e4ae673a54921dff9aa5 (patch) | |
tree | dd55feaf8b7fcadaa9adf310372ecb45f1e53404 /Tools | |
parent | * Cleanup (diff) |
* Cleanup
* Catch up to build ID directory changes
Notes
Notes:
svn path=/head/; revision=217587
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/buildfailure | 29 | ||||
-rwxr-xr-x | Tools/portbuild/scripts/buildsuccess | 25 | ||||
-rwxr-xr-x | Tools/portbuild/scripts/prunefailure | 20 |
3 files changed, 50 insertions, 24 deletions
diff --git a/Tools/portbuild/scripts/buildfailure b/Tools/portbuild/scripts/buildfailure index e15d8de0c975..50fde5696960 100755 --- a/Tools/portbuild/scripts/buildfailure +++ b/Tools/portbuild/scripts/buildfailure @@ -1,6 +1,6 @@ #!/bin/sh # -# buildfailure <arch> <branch> <pkgname> +# buildfailure <arch> <branch> <buildid> <pkgname> cleanup() { echo "Problem writing new failure file!" @@ -10,17 +10,28 @@ cleanup() { # configurable variables pb=/var/portbuild + +usage () { + echo "usage: buildfailure arch branch buildid pkgname" + exit 1 +} + +if [ $# -ne 4 ]; then + usage +fi + arch=$1 -shift 1 +branch=$2 +buildid=$3 +pkgname=$4 +shift 4 + +builddir=${pb}/${arch}/${branch}/builds/${buildid} . ${pb}/${arch}/portbuild.conf . ${pb}/scripts/buildenv -branch=$1 -pkgname=$2 -shift 2 - -buildenv ${pb} ${arch} ${branch} +buildenv ${pb} ${arch} ${branch} ${builddir} # Don't pick up installed packages from the host export LOCALBASE=/nonexistentlocal @@ -29,7 +40,7 @@ export X11BASE=/nonexistentx index=${PORTSDIR}/${INDEXFILE} portloc=$(grep "^$pkgname|" ${index} | cut -f 2 -d \| | sed s,/usr/ports/,,) -pkgbase=$(cd ${pb}/${arch}/${branch}/ports/${portloc}/ && make -V PKGBASE) +pkgbase=$(cd ${PORTSDIR}/${portloc}/ && make -V PKGBASE) cd ${pb}/${arch}/${branch} entry=$(grep "^${portloc}|" failure) @@ -48,5 +59,5 @@ fi link=${pb}/${arch}/${branch}/latest/${portloc} mkdir -p $(dirname ${link}) -errorloc=$(realpath ${pb}/${arch}/${branch}/errors/${pkgname}.log) +errorloc=$(realpath ${builddir}/errors/${pkgname}.log) ln -sf ${errorloc} ${link} diff --git a/Tools/portbuild/scripts/buildsuccess b/Tools/portbuild/scripts/buildsuccess index 0f6ab346088b..3c5b7d0e5ed8 100755 --- a/Tools/portbuild/scripts/buildsuccess +++ b/Tools/portbuild/scripts/buildsuccess @@ -1,20 +1,31 @@ #!/bin/sh # -# buildsuccess <arch> <branch> <pkgname> +# buildsuccess <arch> <branch> <buildid> <pkgname> # configurable variables pb=/var/portbuild + +usage () { + echo "usage: buildsuccess arch branch buildid pkgname" + exit 1 +} + +if [ $# -ne 4 ]; then + usage +fi + arch=$1 -shift +branch=$2 +buildid=$3 +pkgname=$4 +shift 4 + +builddir=${pb}/${arch}/${branch}/builds/${buildid} . ${pb}/${arch}/portbuild.conf . ${pb}/scripts/buildenv -branch=$1 -pkgname=$2 -shift 2 - -buildenv ${pb} ${arch} ${branch} +buildenv ${pb} ${arch} ${branch} ${builddir} # Don't pick up installed packages from the host export LOCALBASE=/nonexistentlocal diff --git a/Tools/portbuild/scripts/prunefailure b/Tools/portbuild/scripts/prunefailure index 823ba3a6c998..93da40388593 100755 --- a/Tools/portbuild/scripts/prunefailure +++ b/Tools/portbuild/scripts/prunefailure @@ -4,7 +4,7 @@ # # This must be called via: # -# lockf -k ${pb}/${arch}/${branch}/failure.lock ${pb}/scripts/prunefailure ${arch} ${branch} +# lockf -k ${pb}/${arch}/${branch}/failure.lock ${pb}/scripts/prunefailure ${arch} ${branch} ${buildid} # # to avoid racing with any package builds in progress that might try to append to # these files. @@ -18,24 +18,28 @@ cleanup() { exit 1 } -if [ $# -ne 2 ]; then - echo "prunefailure <arch> <branch>" +if [ $# -ne 3 ]; then + echo "prunefailure <arch> <branch> <buildid>" exit 1 fi arch=$1 branch=$2 -shift 2 +buildid=$3 +shift 3 . ${pb}/${arch}/portbuild.conf . ${pb}/scripts/buildenv -buildenv ${pb} ${arch} ${branch} + +builddir=${pb}/${arch}/${branch}/builds/${buildid} + +buildenv ${pb} ${arch} ${branch} ${builddir} home=${pb}/${arch}/${branch} cd $home -pkgdir=$home/packages/All +pkgdir=${builddir}/packages/All index=${PORTSDIR}/${INDEXFILE} if [ "`wc -l $index | awk '{print $1}'`" -lt 9000 ]; then @@ -65,13 +69,13 @@ while read dir name ver olddate date count; do newver=$(echo $entry | awk '{print $1}') - if [ -e "$home/packages/All/$newver${PKGSUFFIX}" ]; then + if [ -e "${builddir}/packages/All/$newver${PKGSUFFIX}" ]; then echo "$newver package exists, should not still be here!" rm -f ${pb}/${arch}/${branch}/latest/${dir} continue fi - if grep -qxF $newver $home/duds.full; then + if grep -qxF $newver ${builddir}/duds.full; then echo "$newver listed in duds, should not be here" rm -f ${pb}/${arch}/${branch}/latest/${dir} continue |