mirror of
https://git.freebsd.org/ports.git
synced 2025-06-03 03:46:30 -04:00
These scripts are run when a build completes (successfully or not). They
keep track of the number of times a port has failed to build, resetting the counter when it builds successfully. There are still some bugs to be worked out, but this will be used as the basis for maintainer notification of port failures.
This commit is contained in:
parent
220758235c
commit
df64a01f68
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=73922
2 changed files with 80 additions and 0 deletions
48
Tools/portbuild/scripts/buildfailure
Executable file
48
Tools/portbuild/scripts/buildfailure
Executable file
|
@ -0,0 +1,48 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# buildfailure <arch> <branch> <pkgname>
|
||||
|
||||
# configurable variables
|
||||
pb=/var/portbuild
|
||||
arch=$1
|
||||
shift 1
|
||||
|
||||
. ${pb}/${arch}/portbuild.conf
|
||||
. ${pb}/scripts/buildenv
|
||||
|
||||
branch=$1
|
||||
pkgname=$2
|
||||
shift 2
|
||||
|
||||
buildenv ${pb} ${arch} ${branch}
|
||||
|
||||
# Don't pick up installed packages from the host
|
||||
export LOCALBASE=/nonexistentlocal
|
||||
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)
|
||||
|
||||
cd ${pb}/${arch}/${branch}
|
||||
if grep -q "^${portloc}|" failure; then
|
||||
count=$(grep "^${portloc}|" failure | cut -f 5 -d \|)
|
||||
grep -v "^${portloc}|" failure > failure.new
|
||||
|
||||
echo "${portloc}|${pkgbase}|${pkgname}|$(date | tr ' ' '_')|$((${count}+1))" >> failure.new
|
||||
mv failure.new failure
|
||||
else
|
||||
# Want newfailure to be in reverse chronological order
|
||||
mv newfailure newfailure.new
|
||||
echo "${portloc}|${pkgbase}|${pkgname}|$(date | tr ' ' '_')" > newfailure
|
||||
cat newfailure newfailure.new > newfailure.new2
|
||||
mv newfailure.new2 newfailure
|
||||
rm newfailure.new
|
||||
|
||||
echo "${portloc}|${pkgbase}|${pkgname}|$(date)|1" >> failure
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
32
Tools/portbuild/scripts/buildsuccess
Executable file
32
Tools/portbuild/scripts/buildsuccess
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# buildsuccess <arch> <branch> <pkgname>
|
||||
|
||||
# configurable variables
|
||||
pb=/var/portbuild
|
||||
arch=$1
|
||||
shift
|
||||
|
||||
. ${pb}/${arch}/portbuild.conf
|
||||
. ${pb}/scripts/buildenv
|
||||
|
||||
branch=$1
|
||||
pkgname=$2
|
||||
shift 2
|
||||
|
||||
buildenv ${pb} ${arch} ${branch}
|
||||
|
||||
# Don't pick up installed packages from the host
|
||||
export LOCALBASE=/nonexistentlocal
|
||||
export X11BASE=/nonexistentx
|
||||
|
||||
index=${PORTSDIR}/${INDEXFILE}
|
||||
|
||||
portloc=$(grep "^$pkgname|" ${index} | cut -f 2 -d \| | sed s,/usr/ports/,,)
|
||||
|
||||
cd ${pb}/${arch}/${branch}
|
||||
grep -v "^${portloc}|" failure > failure.new
|
||||
mv failure.new failure
|
||||
|
||||
grep -v "^${portloc}|" newfailure > newfailure.new
|
||||
mv newfailure.new newfailure
|
Loading…
Add table
Reference in a new issue