aboutsummaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2005-10-11 11:40:57 +0800
committerkris <kris@FreeBSD.org>2005-10-11 11:40:57 +0800
commit2a1284765ba4d05570ceecccdad84117f2d1831d (patch)
tree446edc864163eff8061a0816157e05b61d43e9ab /Tools
parent53ecb512dc92a336d303d5bf366e177cfe1fbdc1 (diff)
downloadfreebsd-ports-gnome-2a1284765ba4d05570ceecccdad84117f2d1831d.tar.gz
freebsd-ports-gnome-2a1284765ba4d05570ceecccdad84117f2d1831d.tar.zst
freebsd-ports-gnome-2a1284765ba4d05570ceecccdad84117f2d1831d.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
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