diff options
author | Kris Kennaway <kris@FreeBSD.org> | 2008-07-26 14:02:38 +0000 |
---|---|---|
committer | Kris Kennaway <kris@FreeBSD.org> | 2008-07-26 14:02:38 +0000 |
commit | f204e780130da75d05b2013745d5e2fee448e8ec (patch) | |
tree | 9542c22a04e3c6f9cce36f92e170805a86a2375e /Tools | |
parent | 5de4ad731b6fb1cb5808ba311e13dd05df2a08a9 (diff) | |
download | ports-f204e780130da75d05b2013745d5e2fee448e8ec.tar.gz ports-f204e780130da75d05b2013745d5e2fee448e8ec.zip |
Notes
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/portbuild | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/Tools/portbuild/scripts/portbuild b/Tools/portbuild/scripts/portbuild index 2613363cfa87..30a26eb7881e 100755 --- a/Tools/portbuild/scripts/portbuild +++ b/Tools/portbuild/scripts/portbuild @@ -1,6 +1,6 @@ #!/bin/sh -# usage: $0 ARCH BRANCH [-noclean] [-norestr] [-noplistcheck] [-distfiles] [-fetch-original] [-trybroken] PKGNAME.tgz DIRNAME [DEPENDENCY.tgz ...] +# usage: $0 ARCH BRANCH BUILDID CHROOT [-noclean] [-norestr] [-noplistcheck] [-distfiles] [-fetch-original] [-trybroken] PKGNAME.tgz DIRNAME [DEPENDENCY.tgz ...] mount_fs() { @@ -51,7 +51,10 @@ bailout() pb=/var/portbuild arch=$1 -shift +branch=$2 +buildid=$3 +chroot=$4 +shift 4 # Default niceness value nice=0 @@ -63,10 +66,6 @@ nice=0 buildroot=${scratchdir} error=0 -branch=$1 -chroot=$2 -shift 2 - clean=1 if [ "x$1" = "x-noclean" ]; then clean=0 @@ -105,7 +104,8 @@ FD=$3 BD=$4 RD=$5 -buildenv ${pb} ${arch} ${branch} +builddir=${pb}/${arch}/${branch}/builds/${buildid} +buildenv ${pb} ${arch} ${branch} ${builddir} # Want to use the /etc/make.conf in the chroot unset __MAKE_CONF @@ -147,10 +147,8 @@ export PATH=/sbin:/bin:/usr/sbin:/usr/bin:${LOCALBASE}/sbin:${LOCALBASE}/bin:${X echo "building $pkgname in $chroot" -bakdir=${pb}/${arch}/${branch}/tarballs -bindist=${buildroot}/${branch}/tarballs/bindist.tar -bindistlocal=${buildroot}/${branch}/tarballs/bindist-$(hostname).tar -packages=${pb}/${arch}/${branch}/packages +bindist=${buildroot}/${branch}/${buildid}/tarballs/bindist.tar +bindistlocal=${buildroot}/${branch}/${buildid}/tarballs/bindist-$(hostname).tar if [ -f ${chroot}/.notready ]; then tar -C ${chroot} -xpf ${bindist} @@ -207,12 +205,12 @@ if [ ! -z "${ccache_dir}" ]; then fi fi -mount_fs ${pb}/${arch}/${branch}/ports ${chroot}/a/ports ${master} +mount_fs ${builddir}/ports ${chroot}/a/ports ${master} ln -sf ../a/ports ${chroot}/usr/ports mkdir -p ${chroot}/usr/src -mount_fs ${pb}/${arch}/${branch}/src ${chroot}/usr/src ${master} +mount_fs ${builddir}/src ${chroot}/usr/src ${master} mount -t devfs foo ${chroot}/dev umount -f ${chroot}/compat/linux/proc > /dev/null 2>&1 @@ -303,4 +301,8 @@ if [ "${error}" = 0 ]; then fi rm -rf ${chroot}/${WRKDIRPREFIX} + +# Record build completion time for ganglia +echo "${arch} ${branch} ${buildid}" > ${buildroot}/stamp/${pkgname} + exit $error |