aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2005-10-11 03:40:57 +0000
committerKris Kennaway <kris@FreeBSD.org>2005-10-11 03:40:57 +0000
commite93c55ca9b8a5fd5504f4ff581843c9f1619223a (patch)
tree332091c48d73f3097daeef5178d298d0666ff8eb /Tools
parent917dfa95abcb4738e24a6d25a4b954d1229b4051 (diff)
downloadports-e93c55ca9b8a5fd5504f4ff581843c9f1619223a.tar.gz
ports-e93c55ca9b8a5fd5504f4ff581843c9f1619223a.zip
* Unmount linprocfs around pkg_adding dependencies, to try and work
around silly failures in some ports when it is present * Add a footer to completed builds that is recognised by pdispatch to retry truncated builds * If ALWAYS_KEEP_DISTFILES is not present in the environment or port makefile, then clean up DISTDIR after the build finishes, to prevent collection of distfiles for this port. * Finish flipping the switch on -noplistcheck - this is activated by passing in the NOPLISTCHECK environment variable instead of using PLISTCHECK in the opposite case
Notes
Notes: svn path=/head/; revision=144888
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/portbuild/scripts/buildscript44
1 files changed, 41 insertions, 3 deletions
diff --git a/Tools/portbuild/scripts/buildscript b/Tools/portbuild/scripts/buildscript
index d2c5b3ec74c3..e4a9525efbbd 100755
--- a/Tools/portbuild/scripts/buildscript
+++ b/Tools/portbuild/scripts/buildscript
@@ -3,9 +3,34 @@
# usage: $0 DIRNAME PHASE
# PHASE is 1 (checksum) or 2 (package)
+mountprocfs() {
+ arch=$1
+
+ if [ ${arch} = "i386" ]; then
+ # JDK ports need linprocfs :(
+ mkdir -p /compat/linux/proc
+ mount_linprocfs linprocfs /compat/linux/proc
+ fi
+}
+
+umountprocfs() {
+ arch=$1
+
+ if [ ${arch} = "i386" ]; then
+ umount -f /compat/linux/proc 2> /dev/null > /dev/null
+ fi
+}
+
cleanup() {
status=$1
+ cd ${dir}
+ keep_distfiles=$(make -V ALWAYS_KEEP_DISTFILES)
+ distdir=$(make -V DISTDIR)
+ if [ -z "${keep_distfiles}" -a ! -z "${distdir}" ]; then
+ rm -rf ${distdir}/*
+ fi
+
if [ -e ${dir}/.keep ]; then
cd ${dir}
objdir=$(make -V WRKDIR)
@@ -15,7 +40,7 @@ cleanup() {
cat /tmp/make.log${status}
echo 1 > /tmp/status
echo "================================================================"
- echo -n "build ended at "
+ echo -n "build of ${dir} ended at "
date
exit 0
@@ -28,6 +53,8 @@ add_pkg() {
cd /tmp/depends
export PKG_PATH=/tmp/depends
if [ ! -z "${pkgs}" ]; then
+ arch=$(uname -m)
+ umountprocfs ${arch}
echo "adding dependencies"
for i in $pkgs; do
echo "pkg_add $i"
@@ -43,6 +70,7 @@ add_pkg() {
fi
fi
done
+ mountprocfs ${arch}
fi
}
@@ -176,7 +204,7 @@ EOF
grep ' extra$' /tmp/list3 | awk '{print $1}' | xargs -J % find % -ls > /tmp/list4
grep ' missing$' /tmp/list3 > /tmp/list5
grep -vE ' (extra|missing)$' /tmp/list3 > /tmp/list6
- if [ "x${PLISTCHECK}" != "x" ]; then
+ if [ "x${NOPLISTCHECK}" = "x" ]; then
if grep -qE 'usr/(local|X11R6)/(bin/|include/|man/|sbin/|share/|share/|lib/|libdata/|libexec/)' /tmp/list4; then
echo "1" > /tmp/status
fi
@@ -211,7 +239,7 @@ EOF
if [ -s /tmp/list6 ]; then
echo "list of filesystem changes from before and after port installation and deinstallation"
cat /tmp/list6
- if [ "x${PLISTCHECK}" != "x" ]; then
+ if [ "x${NOPLISTCHECK}" = "x" ]; then
echo "1" > /tmp/status
fi
fi
@@ -223,12 +251,22 @@ EOF
kill $(jobid %1)
fi
+ cd ${dir}
+ keep_distfiles=$(make -V ALWAYS_KEEP_DISTFILES)
+ distdir=$(make -V DISTDIR)
+ if [ -z "${keep_distfiles}" -a ! -z "${distdir}" ]; then
+ rm -rf ${distdir}/*
+ fi
+
if [ -e ${dir}/.keep ]; then
cd ${dir}
objdir=$(make -V WRKDIR)
tar cfjC /tmp/work.tbz ${objdir}/.. work
fi
+ echo "================================================================"
+ echo -n "build of ${dir} ended at "
+ date
fi
exit 0