diff options
author | kris <kris@FreeBSD.org> | 2003-02-14 09:26:20 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2003-02-14 09:26:20 +0000 |
commit | 62521d1c366f9aeba30f9fa1710be5b11fe03695 (patch) | |
tree | 7a692d3ce4a68e7ddbd10aaa7858bdbaf7dcaa08 /Tools/portbuild | |
parent | f0222e3adbe1ceffd65dc8c6a1c6aed8333dec5f (diff) | |
download | FreeBSD-ports-62521d1c366f9aeba30f9fa1710be5b11fe03695.zip FreeBSD-ports-62521d1c366f9aeba30f9fa1710be5b11fe03695.tar.gz |
Work around broken rand() in -current by changing the way we pick a
random build host.
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-x | Tools/portbuild/scripts/pdispatch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/portbuild/scripts/pdispatch b/Tools/portbuild/scripts/pdispatch index 2128440..2f01f60 100755 --- a/Tools/portbuild/scripts/pdispatch +++ b/Tools/portbuild/scripts/pdispatch @@ -31,10 +31,10 @@ if grep -qxF $pkgname ${pb}/${arch}/${branch}/duds; then fi args=${1+"$@"} -mach=$(cat ${pb}/${arch}/ulist) -num=$(echo $(echo $mach | wc -w)) +num=$(wc -w ${pb}/${arch}/ulist | awk '{print $1}') +random=$(jot -r 1 1 ${num}) +mach=$(cat ${pb}/${arch}/ulist | cut -f ${random} -d ' ' ) set $mach -shift $(echo "$$ $num" | awk '{srand($1); print(int(rand()*$2))}') flags="" if [ "x$NOCLEAN" != "x" ]; then flags="${flags} -noclean" |