svn commit: r244595 - projects/portbuild/scripts

Mark Linimon linimon at FreeBSD.org
Sat Dec 22 19:09:16 UTC 2012


Author: linimon (doc,ports committer)
Date: Sat Dec 22 19:09:15 2012
New Revision: 244595
URL: http://svnweb.freebsd.org/changeset/base/244595

Log:
  Add code to test disabling the proxy entirely.  Requires zfs delegation
  to be set up correctly for it to work.

Modified:
  projects/portbuild/scripts/build

Modified: projects/portbuild/scripts/build
==============================================================================
--- projects/portbuild/scripts/build	Sat Dec 22 15:13:16 2012	(r244594)
+++ projects/portbuild/scripts/build	Sat Dec 22 19:09:15 2012	(r244595)
@@ -11,6 +11,8 @@ pbd=${PORTBUILD_DATA:-/var/portbuild}
 # duplication.
 quoted_subdirs="'/src' '/ports' ''"
 
+#DISABLE_PROXY = True
+
 # XXX unused
 get_latest_snap() {
     snap=$1
@@ -522,6 +524,10 @@ proxy_root() {
     shift 5
     args=$@
 
+if DISABLE_PROXY:
+	eval "do_${cmd} ${arch} ${branch} ${buildid} ${builddir} ${args}"
+	error=$?
+else:
     id=$(id -u)
     if [ ${id} != "0" ]; then
 	${pbc}/scripts/buildproxy-client "build ${cmd} ${arch} ${branch} ${buildid} ${args}"
@@ -533,6 +539,7 @@ proxy_root() {
 	eval "do_${cmd} ${arch} ${branch} ${buildid} ${builddir} ${args}"
 	error=$?
     fi
+fi
 
     exit ${error}
 }
@@ -547,6 +554,10 @@ proxy_user() {
     shift 5
     args=$@
 
+if DISABLE_PROXY:
+	eval "do_${cmd} ${arch} ${branch} ${buildid} \"${builddir}\" ${args}"
+	error=$?
+else:
     id=$(id -u)
     if [ ${id} != "0" ]; then
 	eval "do_${cmd} ${arch} ${branch} ${buildid} \"${builddir}\" ${args}"
@@ -555,6 +566,7 @@ proxy_user() {
 	su ${uid} -c "${pbc}/scripts/build ${cmd} ${arch} ${branch} ${buildid} \"${builddir}\" ${args}"
 	error=$?
     fi
+fi
 
     exit ${error}
 }


More information about the svn-src-projects mailing list