Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Feb 2004 03:11:41 -0500 (EST)
From:      Trevor Johnson <trevor@jpj.net>
To:        Jason Harris <jharris@widomaker.com>
Cc:        FreeBSD-gnats-submit@freebsd.org
Subject:   Re: ports/61972: make USE_SIZE the default in bsd.port.mk
Message-ID:  <20040202025212.W17349@blues.jpj.net>
In-Reply-To: <200401262328.i0QNSV8f053327@pm1.ric-07.lft.widomaker.com>
References:  <200401262328.i0QNSV8f053327@pm1.ric-07.lft.widomaker.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> --- bsd.port.mk.orig	Mon Jan 26 18:11:56 2004
> +++ bsd.port.mk	Mon Jan 26 18:20:34 2004
> @@ -4084,6 +4084,7 @@
>
>  # Checksumming utilities
>
> +USE_SIZE?=	yes
>  .if !target(makesum)
>  makesum:
>  	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} fetch NO_CHECKSUM=yes
> @@ -4091,7 +4092,7 @@
>  	@(cd ${DISTDIR}; \
>  	 for file in ${_CKSUMFILES}; do \
>  		${MD5} $$file >> ${MD5_FILE}; \
> -		if [ -n "${USE_SIZE}" ]; then \
> +		if [ ${USE_SIZE} = "yes" ]; then \
>  			${ECHO_CMD} "SIZE ($$file) = "`${LS} -ALln $$file | ${AWK} '{print $$5}'` >> ${MD5_FILE}; \
>  		fi; \
>  	 done)

Here's a slightly different way to do the same thing:

Index: /usr/ports/Mk/bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.483
diff -u -r1.483 bsd.port.mk
--- /usr/ports/Mk/bsd.port.mk	24 Jan 2004 01:26:30 -0000	1.483
+++ /usr/ports/Mk/bsd.port.mk	2 Feb 2004 08:07:38 -0000
@@ -725,6 +725,12 @@
 #				  to 0:0.  Set this variable if you want to turn off this
 #				  feature.
 #
+# For makesum:
+#
+# NO_SIZE	- Don't record size data in distinfo, needed when the master site
+# does not report file sizes, or when multiple valid versions of a distfile,
+# having different sizes, exist.
+#
 # For patch:
 #
 # EXTRA_PATCHES - Define this variable if you have patches not in
@@ -4091,7 +4097,7 @@
 	@(cd ${DISTDIR}; \
 	 for file in ${_CKSUMFILES}; do \
 		${MD5} $$file >> ${MD5_FILE}; \
-		if [ -n "${USE_SIZE}" ]; then \
+		if [ -z "${NO_SIZE}" ]; then \
 			${ECHO_CMD} "SIZE ($$file) = "`${LS} -ALln $$file | ${AWK} '{print $$5}'` >> ${MD5_FILE}; \
 		fi; \
 	 done)
-- 
Trevor Johnson



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040202025212.W17349>