aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2002-06-06 20:55:57 +0000
committerKris Kennaway <kris@FreeBSD.org>2002-06-06 20:55:57 +0000
commit79fb8478c241a1582dd1a854fdd7c468661e8c78 (patch)
treea9f215a03fd686c4f3d42da3d24e2bc4a6c8e333 /Tools
parent42ccfa9b079cf0ac4b759ea5f21f22a5e631b6d3 (diff)
downloadports-79fb8478c241a1582dd1a854fdd7c468661e8c78.tar.gz
ports-79fb8478c241a1582dd1a854fdd7c468661e8c78.zip
Only run ldconfig -aout commands on i386
Correct some build environment variables Exit with code 255 if the port build failed uncleanly
Notes
Notes: svn path=/head/; revision=60722
Diffstat (limited to 'Tools')
-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