diff options
author | linimon <linimon@FreeBSD.org> | 2010-06-26 07:04:53 +0800 |
---|---|---|
committer | linimon <linimon@FreeBSD.org> | 2010-06-26 07:04:53 +0800 |
commit | f5f347260436d94d391dcef52326d06a7073c38e (patch) | |
tree | 00179e183cf2a680dfc964263084b506a6089e23 /Tools/portbuild | |
parent | c032e3072deeae7cec18965557d83db0f3ce8c1b (diff) | |
download | freebsd-ports-gnome-f5f347260436d94d391dcef52326d06a7073c38e.tar.gz freebsd-ports-gnome-f5f347260436d94d391dcef52326d06a7073c38e.tar.zst freebsd-ports-gnome-f5f347260436d94d391dcef52326d06a7073c38e.zip |
Generalize the packge building scripts to be able to be run on more than
one 'head' node, rather than just pointyhat itself.
Constants are factored out into installation-specific files known as
portbuild/conf/server.conf and portbuild/conf/client.conf. There is
only one server.conf file. Individual <arch> directories may have
their own client.conf files, or may symlink to ../conf/client.conf.
While here, rework the code a bit to parameterize arch-specific tasks.
Feature safe: yes
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-x | Tools/portbuild/scripts/clean-chroot | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/Tools/portbuild/scripts/clean-chroot b/Tools/portbuild/scripts/clean-chroot index 7ec91af79bf8..aeab24219d36 100755 --- a/Tools/portbuild/scripts/clean-chroot +++ b/Tools/portbuild/scripts/clean-chroot @@ -1,4 +1,7 @@ #!/bin/sh +# $FreeBSD$ + +# client-side script to clean up a chroot kill_procs() { @@ -40,13 +43,10 @@ chroot=$4 clean=$5 pb=/var/portbuild + +. ${pb}/${arch}/client.conf . ${pb}/${arch}/portbuild.conf . ${pb}/${arch}/portbuild.$(hostname) -. ${pb}/scripts/buildenv - -builddir=${pb}/${arch}/${branch}/builds/${buildid} - -buildenv ${pb} ${arch} ${branch} ${builddir} # directories to clean cleandirs="${LOCALBASE} /compat /var/db/pkg" @@ -67,9 +67,12 @@ fi #umount ${chroot}/proc -if [ ${arch} = "i386" -o ${arch} = "amd64" ]; then - cleanup_mount ${chroot} /compat/linux/proc -fi +for i in ${ARCHS_REQUIRING_LINPROCFS}; do + if [ ${i} = ${arch} ]; then + cleanup_mount ${chroot} /compat/linux/proc + break + fi +done for i in /a/ports /usr/src /dev /root/.ccache; do cleanup_mount ${chroot} ${i} @@ -103,9 +106,12 @@ else fi done test -x ${chroot}/sbin/ldconfig && chroot ${chroot} /sbin/ldconfig -R - if [ ${arch} = "i386" ]; then - test -x ${chroot}/sbin/ldconfig && chroot ${chroot} /sbin/ldconfig -aout -R - fi + for i in ${ARCHS_REQUIRING_AOUT_COMPAT}; do + if [ ${i} = ${arch} ]; then + test -x ${chroot}/sbin/ldconfig && chroot ${chroot} /sbin/ldconfig -aout -R + break + fi + done rm -rf ${chroot}/var/db/pkg/* rm -rf ${chroot}/used elif [ "${clean}" = 2 ]; then |