pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/fetch set ORS to space for _MASTER_RAND_AWK, so tha...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3bf5a9e9fb0d
branches: trunk
changeset: 521879:3bf5a9e9fb0d
user: jdolecek <jdolecek%pkgsrc.org@localhost>
date: Sat Nov 25 21:33:39 2006 +0000
description:
set ORS to space for _MASTER_RAND_AWK, so that the output would be the
in the format MASTER_SORT_REGEX expects when MASTER_SORT_RANDOM is off,
in order for MASTER_SORT to actually work when MASTER_SORT_RANDOM=YES
(default nowadays)
XXX testing stuff before committing would surely be a good idea
diffstat:
mk/fetch/fetch.mk | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 858c40b48bba -r 3bf5a9e9fb0d mk/fetch/fetch.mk
--- a/mk/fetch/fetch.mk Sat Nov 25 20:47:57 2006 +0000
+++ b/mk/fetch/fetch.mk Sat Nov 25 21:33:39 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: fetch.mk,v 1.22 2006/10/08 11:37:38 mishka Exp $
+# $NetBSD: fetch.mk,v 1.23 2006/11/25 21:33:39 jdolecek Exp $
_MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP:=${DIST_SUBDIR}${DIST_SUBDIR:D/}}
_MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE:=${DIST_SUBDIR}${DIST_SUBDIR:D/}}
@@ -36,7 +36,7 @@
# No actual sorting is done until _ORDERED_SITES is expanded.
#
.if defined(MASTER_SORT_RANDOM) && !empty(MASTER_SORT_RANDOM:M[yY][eE][sS])
-_MASTER_RAND_AWK= BEGIN { srand(seed) } { \
+_MASTER_RAND_AWK= BEGIN { srand(seed); ORS = " " } { \
n = split($$0, site); \
for (i = n; i > 0; i--) { \
ir = int(rand() * i + 1); \
@@ -55,7 +55,7 @@
_MASTER_SORT_AWK+= /${srt:C/\//\\\//g}/ { good["${srt:S/\\/\\\\/g}"] = good["${srt:S/\\/\\\\/g}"] " " $$0 ; next; }
. endfor
_MASTER_SORT_AWK+= { rest = rest " " $$0; } END { n=split(gl, gla); for(i=1;i<=n;i++) { print good[gla[i]]; } print rest; }
-_SORT_SITES_CMD+= | ${AWK} '${_MASTER_SORT_AWK}'
+_SORT_SITES_CMD= | ${AWK} '${_MASTER_SORT_AWK}'
.endif
.if defined(_RAND_SITES_CMD) || defined(_SORT_SITES_CMD)
Home |
Main Index |
Thread Index |
Old Index