diff options
author | asami <asami@FreeBSD.org> | 1999-01-22 10:00:08 +0000 |
---|---|---|
committer | asami <asami@FreeBSD.org> | 1999-01-22 10:00:08 +0000 |
commit | 8fdbb210f51b2f33711ec901618aa091c96ef285 (patch) | |
tree | 0aefa566db26d3471b9c77f21894f4b0549617e0 /Tools/portbuild | |
parent | ad9bc0fa1e7ea609c5004e2b2a7093382fa9d1e9 (diff) | |
download | FreeBSD-ports-8fdbb210f51b2f33711ec901618aa091c96ef285.zip FreeBSD-ports-8fdbb210f51b2f33711ec901618aa091c96ef285.tar.gz |
By defining NOCLEAN in the environment, you can have the chroot dir left
behind. Useful for debugging.
Touch package on master after copying it back. This will avoid synchronization
problems when the machines' clocks are wildly skewed.
Remove log from master when build is successful. No need to keep around
transient error logs.
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-x | Tools/portbuild/scripts/pdispatch | 9 | ||||
-rwxr-xr-x | Tools/portbuild/scripts/portbuild | 19 |
2 files changed, 22 insertions, 6 deletions
diff --git a/Tools/portbuild/scripts/pdispatch b/Tools/portbuild/scripts/pdispatch index 1156d2d..5c31b7e 100755 --- a/Tools/portbuild/scripts/pdispatch +++ b/Tools/portbuild/scripts/pdispatch @@ -24,5 +24,10 @@ mach=$(cat ${buildroot}/ulist) num=$(echo $(echo $mach | wc -w)) set $mach shift $(echo "$$ $num" | awk '{srand($1); print(int(rand()*$2))}') -echo "dispatching: ssh -a $1 ${command} ${branch} $args" -ssh -a $1 ${command} ${branch} $args +if [ "x$NOCLEAN" != "x" ]; then + echo "dispatching: ssh -a $1 ${command} ${branch} -noclean $args" + ssh -a $1 ${command} ${branch} -noclean $args +else + echo "dispatching: ssh -a $1 ${command} ${branch} $args" + ssh -a $1 ${command} ${branch} $args +fi diff --git a/Tools/portbuild/scripts/portbuild b/Tools/portbuild/scripts/portbuild index 34f21f3..2f70e29 100755 --- a/Tools/portbuild/scripts/portbuild +++ b/Tools/portbuild/scripts/portbuild @@ -1,6 +1,6 @@ #!/bin/sh -# usage: $0 BRANCH PKGNAME.tar DIRNAME [DEPENDENCY.tar ...] +# usage: $0 BRANCH [-noclean] PKGNAME.tgz DIRNAME [DEPENDENCY.tgz ...] master=bento @@ -17,6 +17,7 @@ export WRKDIRPREFIX=/tmp export DEPENDS_TARGET=/usr/bin/true # don't pass -j, -k etc. to sub-makes unset MAKEFLAGS +unset PORTSDIR # 15 minutes export FTP_TIMEOUT=900 @@ -32,6 +33,12 @@ buildroot=/a/asami/portbuild branch=$1 shift +noclean=0 +if [ "x$1" = "x-noclean" ]; then + noclean=1 + shift +fi + if [ ${branch} = "3.0" ]; then export OSREL=3.0 export OSVERSION=300006 @@ -98,6 +105,8 @@ if [ "${error}" = 0 ]; then ssh -a $master tar --unlink -C ${buildroot} -xvf - tar -C ${chroot}/tmp -cf - packages | \ ssh -a $master tar --unlink -C ${buildroot}/${branch} -xvf - + ssh -a $master touch ${buildroot}/${branch}/packages/All/${pkgname}.tgz + ssh $master rm -f ${buildroot}/${branch}/logs/${pkgname}.log else scp ${chroot}/tmp/${pkgname}.log ${master}:${buildroot}/${branch}/logs/${pkgname}.log fi @@ -108,9 +117,11 @@ umount -f ${chroot}/usr/ports umount -f ${chroot}/usr/opt/doc umount -f ${chroot}/usr/src -if ! rm -rf ${chroot} >/dev/null 2>&1; then - chflags -R noschg ${chroot} - rm -rf ${chroot} >/dev/null 2>&1 +if [ $noclean != 1 ]; then + if ! rm -rf ${chroot} >/dev/null 2>&1; then + chflags -R noschg ${chroot} + rm -rf ${chroot} >/dev/null 2>&1 + fi fi echo -n "$pkgname done on $(hostname -s) at " |