1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-17 08:01:36 +00:00

Canonicalize the use of SRC_BASE to fix INDEX and duds builds on head

nodes that don't have /usr/src.  On pointyhat, this "just happens to
work"; on a cleanly installed system like pointyhat-west, it didn't.
This commit is contained in:
Mark Linimon 2010-12-01 02:30:14 +00:00
parent d072a14cd7
commit ac775267a0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=265487
3 changed files with 16 additions and 9 deletions

View File

@ -52,6 +52,7 @@ datestamp=$4
shift 4
. ${pb}/conf/server.conf
. ${pb}/conf/common.conf
. ${pb}/scripts/buildenv
validate_env ${arch} ${branch} || usage
@ -479,9 +480,9 @@ if [ "$skipstart" = 0 ]; then
if [ ${nosrc} -eq 0 ]; then
if [ -L ${builddir}/src -o ${srccvs} -eq 1 ]; then
echo "================================================"
echo "running cvs update -PAd on ${SRCBASE}"
echo "running cvs update -PAd on ${SRC_BASE}"
echo "================================================"
cd ${SRCBASE}
cd ${SRC_BASE}
if [ -z "${updated}" ]; then
# Don't overwrite/create .updated if we didn't set it
# with the ports update
@ -557,6 +558,7 @@ if [ "$skipstart" = 0 ]; then
olderrors=$(readlink ${builddir}/errors)
oldlogs=$(readlink ${builddir}/logs)
# XXX MCL hardcoding of archive/errorlogs
newerrors=${pb}/${arch}/archive/errorlogs/e.${branch}.${buildid}
newlogs=${pb}/${arch}/archive/errorlogs/a.${branch}.${buildid}

View File

@ -4,9 +4,6 @@
# XXX lockfile and interlock with mkbindist to avoid overlapping
# builds
pb=/var/portbuild
. ${pb}/conf/server.conf
if [ $# -lt 3 ]; then
echo "usage: makeworld arch branch buildid [args]"
exit 1
@ -17,9 +14,12 @@ branch=$2
buildid=$3
shift 3
pb=/var/portbuild
builddir=${pb}/${arch}/${branch}/builds/${buildid}
. ${pb}/conf/server.conf
. ${pb}/conf/common.conf
. ${pb}/${arch}/portbuild.conf
# NB: we can't use buildenv because it sets ARCH and MACHINE_ARCH that
# confuses cross-builds
@ -49,13 +49,13 @@ done
# XXX MCL I don't know what this is supposed to do.
if [ "$client" = "1" ]; then
SRCBASE=${pb}/${arch}/src-client
SRC_BASE=${pb}/${arch}/src-client
shift 1
else
SRCBASE=${builddir}/src
SRC_BASE=${builddir}/src
export __MAKE_CONF=/dev/null
fi
cd ${SRCBASE}
cd ${SRC_BASE}
if [ "$nocvs" = "0" ]; then
echo "==> Updating source tree"

View File

@ -65,6 +65,7 @@ shift 4
nice=0
. ${pb}/${arch}/client.conf
. ${pb}/${arch}/common.conf
# note: should NOT need anything from server.conf
. ${pb}/${arch}/portbuild.conf
. ${pb}/${arch}/portbuild.$(hostname)
@ -117,6 +118,9 @@ BD=$4
RD=$5
builddir=${pb}/${arch}/${branch}/builds/${buildid}
# has to be here to affect the setup of OSVERSION and BRANCH in buildenv.client
export SRC_BASE=${CLIENT_SRCBASE}
buildenv.client ${pb} ${arch} ${branch} ${builddir}
# Want to use the /etc/make.conf in the chroot
@ -141,7 +145,6 @@ export PACKAGES=${CLIENT_PACKAGES_LOCATION}
# don't pass -j, -k etc. to sub-makes
unset MAKEFLAGS
unset PORTSDIR
export SRCBASE=${CLIENT_SRCBASE}
# wait 2 hours before killing build with no output
export BUILD_TIMEOUT=${CLIENT_BUILD_TIMEOUT}
@ -275,11 +278,13 @@ done
set x $ED $FD $PD $BD $RD
shift 1
while [ $# -gt 0 ]; do
# XXX MCL more hard-coding
if [ ! -f ${chroot}/tmp/depends/$1 ]; then
echo "copying package $1 for ${pkgname}"
copypkg ${pb} ${CLIENT_UPLOAD_HOST} $1 ${chroot}/tmp/depends "${http_proxy}"
# Test for copy failure and bail
# XXX MCL more hard-coding
if [ ! -f ${chroot}/tmp/depends/$1 ]; then
echo "ERROR: Couldn't copy $1" | tee -a ${chroot}/tmp/${pkgname}.log
bailout ${chroot} ${clean} 255 ${pkgname}