summaryrefslogtreecommitdiffstats
path: root/Tools/portbuild
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2005-10-11 03:55:27 +0000
committerkris <kris@FreeBSD.org>2005-10-11 03:55:27 +0000
commit0c5fd2219b1dfdeab0f250b054fb2007d9242bd3 (patch)
tree3e8850cd7453da68e3f310070b78967d190b0a24 /Tools/portbuild
parentb4816458e25133cc3ae4d29d2218d859bb64f3ff (diff)
downloadFreeBSD-ports-0c5fd2219b1dfdeab0f250b054fb2007d9242bd3.zip
FreeBSD-ports-0c5fd2219b1dfdeab0f250b054fb2007d9242bd3.tar.gz
When -norsync is set, don't bother to run md5 over the bindist.tar
and copy it to the client. This has two benefits: 1) Avoids spamming the master with dozens of md5 processes when dosetupnode is spawned for all client machines at ocne 2) Avoids silly copy attempts on disconnected nodes for which the file is copied to itself
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-xTools/portbuild/scripts/dosetupnode12
1 files changed, 9 insertions, 3 deletions
diff --git a/Tools/portbuild/scripts/dosetupnode b/Tools/portbuild/scripts/dosetupnode
index dc06b4b..c32f569 100755
--- a/Tools/portbuild/scripts/dosetupnode
+++ b/Tools/portbuild/scripts/dosetupnode
@@ -22,10 +22,16 @@ echo "setting up of $node started at $(date)"
disconnected=0
. ${pb}/${arch}/portbuild.${node}
-md5=$(/sbin/md5 ${pb}/${arch}/${branch}/tarballs/bindist.tar | awk '{print $4}')
+if [ "${norsync}" = 1 ]; then
+ md5=0
+ nocopy=-nocopy
+else
+ md5=$(/sbin/md5 ${pb}/${arch}/${branch}/tarballs/bindist.tar | awk '{print $4}')
+ nocopy=
+fi
scp -p ${pb}/scripts/setupnode ${client_user}@${node}:/tmp
-ssh -n ${client_user}@${node} ${sudo_cmd} sh /tmp/setupnode $(hostname) ${pb} ${arch} ${branch} ${scratchdir} ${md5} ${disconnected}
+ssh -n ${client_user}@${node} ${sudo_cmd} sh /tmp/setupnode ${nocopy} $(hostname) ${pb} ${arch} ${branch} ${scratchdir} ${md5} ${disconnected}
if [ ! -z "${sudo_cmd}" -a ${disconnected} = "1" ]; then
ssh -n ${client_user}@${node} ${sudo_cmd} "chown -R ${client_user} /var/portbuild/"
fi
@@ -39,5 +45,5 @@ if [ "${disconnected}" = 1 -a "${norsync}" = 0 ]; then
rsync ${rsync_gzip} -r -L -p --delete ${pb}/${arch}/${branch}/tarballs/ ${client_user}@${node}:${pb}/${arch}/${branch}/tarballs/
fi
-lockf ${pb}/${arch}/queue/.lock ${pb}/scripts/pollmachine ${arch} ${node} -queue
+lockf -k ${pb}/${arch}/queue/.lock ${pb}/scripts/pollmachine ${arch} ${node} -queue
echo "setting up of $node ended at $(date)"
OpenPOWER on IntegriCloud