aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/portbuild
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2002-06-07 04:55:57 +0800
committerkris <kris@FreeBSD.org>2002-06-07 04:55:57 +0800
commit9eb63b88c6e547fb56dd0b9f1d66820f31a2ec21 (patch)
tree03c111486904f3fdf58be0944b3f72c27125d711 /Tools/portbuild
parentfd208cb75b774bb3b7eb2f3c2a73cda30ae6655a (diff)
downloadfreebsd-ports-gnome-9eb63b88c6e547fb56dd0b9f1d66820f31a2ec21.tar.gz
freebsd-ports-gnome-9eb63b88c6e547fb56dd0b9f1d66820f31a2ec21.tar.zst
freebsd-ports-gnome-9eb63b88c6e547fb56dd0b9f1d66820f31a2ec21.zip
Only run ldconfig -aout commands on i386
Correct some build environment variables Exit with code 255 if the port build failed uncleanly
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-xTools/portbuild/scripts/portbuild22
1 files changed, 16 insertions, 6 deletions
diff --git a/Tools/portbuild/scripts/portbuild b/Tools/portbuild/scripts/portbuild
index 87727dcc240a..1950732cfe73 100755
--- a/Tools/portbuild/scripts/portbuild
+++ b/Tools/portbuild/scripts/portbuild
@@ -25,7 +25,9 @@ cleanup()
fi
done
chroot ${chroot} /sbin/ldconfig -R
- chroot ${chroot} /sbin/ldconfig -aout -R #XXX i386 only
+ if [ ${arch} = "i386" ]; then
+ chroot ${chroot} /sbin/ldconfig -aout -R
+ fi
rm -rf ${chroot}/var/db/pkg/*
rm ${chroot}/used/${pkgname}
rmdir ${chroot}/used
@@ -81,8 +83,9 @@ shift 2
buildenv ${pb} ${branch}
-export WRKDIRPREFIX=${buildroot}
+export WRKDIRPREFIX=/tmp
export DISTDIR=/tmp/distfiles
+export PACKAGES=/tmp/packages
# to catch missing dependencies
#export DEPENDS_TARGET=/usr/bin/true
@@ -199,9 +202,12 @@ fi
chroot ${chroot} /sbin/ldconfig -m /usr/lib/compat
chroot ${chroot} /sbin/ldconfig -R
-chroot ${chroot} /sbin/ldconfig -aout -m /usr/lib/aout
-chroot ${chroot} /sbin/ldconfig -aout -m /usr/lib/compat/aout
-chroot ${chroot} /sbin/ldconfig -aout -R
+if [ ${arch} = "i386" ]; then
+ chroot ${chroot} /sbin/ldconfig -aout -m /usr/lib/aout
+ chroot ${chroot} /sbin/ldconfig -aout -m /usr/lib/compat/aout
+ chroot ${chroot} /sbin/ldconfig -aout -R
+fi
+
while [ $# -gt 0 ]; do
if [ -f ${packages}/All/$1 ]; then
@@ -219,7 +225,11 @@ cp -p ${pb}/scripts/buildscript ${pb}/scripts/pnohang ${chroot}
# phase 1, make checksum
chroot ${chroot} /buildscript ${dirname} 1 2>&1 | tee -a ${chroot}/tmp/${pkgname}.log
-error=$(cat ${chroot}/tmp/status)
+if [ -f ${chroot}/tmp/status ]; then
+ error=$(cat ${chroot}/tmp/status)
+else
+ error=255
+fi
if [ "${error}" = 0 ]; then
# make checksum succeeded