summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1999-01-22 10:00:08 +0000
committerSatoshi Asami <asami@FreeBSD.org>1999-01-22 10:00:08 +0000
commit58dc5e1a21daa9937460a4bc5e5e3b568b9ab430 (patch)
tree714f934a79c41134366df1508e37942eb10b2b51
parentPrint out maintainer. (diff)
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.
Notes
Notes: svn path=/head/; revision=16257
-rwxr-xr-xTools/portbuild/scripts/pdispatch9
-rwxr-xr-xTools/portbuild/scripts/portbuild19
2 files changed, 22 insertions, 6 deletions
diff --git a/Tools/portbuild/scripts/pdispatch b/Tools/portbuild/scripts/pdispatch
index 1156d2d80089..5c31b7e51d26 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 34f21f3c2f16..2f70e291f34c 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 "