diff options
author | kris <kris@FreeBSD.org> | 2004-07-14 16:47:03 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2004-07-14 16:47:03 +0800 |
commit | bcbf525b85791604b3f450e9684065fb8b85c06d (patch) | |
tree | 7cdac0012569d535999c5ee3ddfeac562e15204e /Tools | |
parent | 46718a5ce9a5a809d643b8f5938e2dd89cbe056e (diff) | |
download | freebsd-ports-gnome-bcbf525b85791604b3f450e9684065fb8b85c06d.tar.gz freebsd-ports-gnome-bcbf525b85791604b3f450e9684065fb8b85c06d.tar.zst freebsd-ports-gnome-bcbf525b85791604b3f450e9684065fb8b85c06d.zip |
* Break out the 'parallel' target from /usr/ports/Makefile. One
advantage is that here we know the value of PKGSUFFIX (.tgz/.tbz) for
the build via buildenv.
* Add a list of 'quickports', which are ports with long dependency chains
that we should kick off straight away to try and avoid bottlenecks later
on when most of the cluster idles waiting for one or two ports to build.
Ideally we'd build dependencies of these ports exclusively first and only
build other ports when we run out (i.e. a build slot becomes free), but I
couldn't work out how to do this. As a compromise, we now do
'make -k -j<#> quickports all' which doesn't give quite as high a
priority to the quickports (i.e. we also build other ports from the
beginning while there are quickport dependencies still to build), but is
better than nothing.
* Pass in the FETCH/EXTRACT/PATCH/BUILD/RUN_DEPENDS separately via env
variables when dispatching a job. This allows us to add and remove
the dependencies at the corresponding build stage to catch ports
with dependencies listed too early/late.
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/makeparallel | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/Tools/portbuild/scripts/makeparallel b/Tools/portbuild/scripts/makeparallel index a454cb95bf63..621d1ef0abbd 100755 --- a/Tools/portbuild/scripts/makeparallel +++ b/Tools/portbuild/scripts/makeparallel @@ -15,16 +15,50 @@ branch=$2 buildenv ${pb} ${arch} ${branch} +# packages that take a long time to build or have very deep dependency +# trees and tend to stall the rest of the cluster waiting for them. +# We try to start these as early as possible. + +quickports="lang/ghc x11/XFree86-4 editors/openoffice-1.1 x11/gnome2 x11/kde3 editors/openoffice-1.0 chinese/openoffice-1.0-zh_CN chinese/openoffice-1.0-zh_TW editors/openoffice-1.0 editors/openoffice-1.0-ar editors/openoffice-1.0-dk editors/openoffice-1.0-es editors/openoffice-1.0-gr editors/openoffice-1.0-it editors/openoffice-1.0-nl editors/openoffice-1.0-se editors/openoffice-1.0-tr french/openoffice-1.0 german/openoffice-1.0 japanese/openoffice-1.0 korean/openoffice-1.0 polish/openoffice-1.0 portuguese/openoffice-1.0 russian/openoffice-1.0 math/atlas math/atlas-devel java/jdk14" + cd ${PORTSDIR} subdir=$(make -V SUBDIR) makefile=${pb}/${arch}/${branch}/Makefile -sufx=${PKGSUFFIX} - rm ${makefile} -for dir in ${subdir}; do - echo "all: ${dir}-all" >> ${makefile} +SUBDIR=$(make -V SUBDIR) +(for dir in ${SUBDIR}; do + [ -r ${dir}/Makefile ] && echo "all: ${dir}-all" || true done - awk -F '|' "{me=\$1; here=\$2; bdep=\$8; rdep=\$9; split(here, tmp, \"/\"); if (bdep != \"\") { gsub(\"\$\", \"${sufx}\", bdep); gsub(\" \", \"${sufx} \", bdep); } if (rdep != \"\") { gsub(\"\$\", \"${sufx}\", rdep); gsub(\" \", \"${sufx} \", rdep); } print tmp[4] \"-all: \" me \"${sufx}\"; print me \": \" me \"${sufx}\"; print me \"${sufx}: \" bdep \" \" rdep; printf(\"\t@/var/portbuild/scripts/pdispatch ${arch} ${branch} /var/portbuild/scripts/portbuild %s${sufx} %s\",me, here); if (bdep != \"\") printf(\" %s\", bdep); if (rdep != \"\") printf(\" %s\", rdep);printf(\"\n\")}" < ${PORTSDIR}/${INDEXFILE} >> ${makefile} - +env arch=${arch} branch=${branch} awk -F '|' '{me=$1; here=$2; bdep=$8; rdep=$9 + edep=$11; pdep=$12; fdep=$13 + sufx=ENVIRON["PKGSUFFIX"] + arch=ENVIRON["arch"] + branch=ENVIRON["branch"] + split(here, tmp, "/") + if (edep != "") { gsub("$", sufx, edep); gsub(" ", sufx " ", edep) } + if (pdep != "") { gsub("$", sufx, pdep); gsub(" ", sufx " ", pdep) } + if (fdep != "") { gsub("$", sufx, fdep); gsub(" ", sufx " ", fdep) } + if (bdep != "") { gsub("$", sufx, bdep); gsub(" ", sufx " ", bdep) } + if (rdep != "") { gsub("$", sufx, rdep); gsub(" ", sufx " ", rdep) } + print tmp[4] "-all: " me sufx + print me ": " me sufx + print me sufx ": " edep " " pdep " " fdep " " bdep " " rdep + printf("\t@/usr/bin/env XXX=\"\" ") + if (edep != "") printf(" ED=\"%s\"", edep) + if (pdep != "") printf(" PD=\"%s\"", pdep) + if (fdep != "") printf(" FD=\"%s\"", fdep) + if (bdep != "") printf(" BD=\"%s\"", bdep) + if (rdep != "") printf(" RD=\"%s\"", rdep) + printf(" /var/portbuild/scripts/pdispatch %s %s /var/portbuild/scripts/portbuild %s%s %s\n", + arch, branch, me, sufx, here) + }' < ${INDEXFILE}) > ${makefile} +for i in ${quickports}; do + if [ -d $i ]; then + quickpkg="$(cd $i; make package-name)${PKGSUFFIX}" + echo "quickports: $quickpkg" >> ${makefile} + else + echo "quick port directory \"$i\" does not exist -- skipping" + fi +done |