Subject: Re: CVS commit: pkgsrc/mk/bulk
To: Jan Schaumann <jschauma@netbsd.org>
From: Thomas Klausner <wiz@NetBSD.org>
List: pkgsrc-changes
Date: 12/06/2006 01:39:59
On Sun, Nov 26, 2006 at 03:08:24AM +0000, Jan Schaumann wrote:
> Module Name:	pkgsrc
> Committed By:	jschauma
> Date:		Sun Nov 26 03:08:24 UTC 2006
> 
> Modified Files:
> 	pkgsrc/mk/bulk: bsd.bulk-pkg.mk
> 
> Log Message:
> - Run a single find(1) command to get the list of new files rather than running
>   two finds+two greps.
> - Run a single find(1) command rather than ls | grep to determine pkg count.

This broke an important part of the bulk build for me:
reusing existing, up-to-date packages.


Index: pkgsrc/mk/bulk/bsd.bulk-pkg.mk
diff -u pkgsrc/mk/bulk/bsd.bulk-pkg.mk:1.125 pkgsrc/mk/bulk/bsd.bulk-pkg.mk:1.126
--- pkgsrc/mk/bulk/bsd.bulk-pkg.mk:1.125	Fri Oct 13 23:14:45 2006
+++ pkgsrc/mk/bulk/bsd.bulk-pkg.mk	Sun Nov 26 03:08:24 2006
@@ -301,8 +301,8 @@
 			uptodate=0; \
 		elif [ "${USE_BULK_TIMESTAMPS}" = "yes" ]; then \
 			${SHCOMMENT} "Check files of this package"; \
-			newfiles="`${FIND} . -type f -newer "${REF}" -print | ${EGREP} -v -e ./work -e COMMENT -e DESCR -e README.html -e CVS -e '^\./\.' || ${TRUE}`"; \
-			nnewfiles="`${FIND} . -type f -newer "${REF}" -print | ${EGREP} -v -e ./work -e COMMENT -e DESCR -e README.html -e CVS -e '^\./\.' | ${WC} -l`"; \
+			newfiles="`${FIND} . -type f -newer "${REF}" ! \( -name ${WRKDIR_BASE} -or -name README.html -or -name DESCR -or -name COMMENT -or -name Repository -or -name Entries -or -name Root -or -name Tag \) -print || ${TRUE}`"; \
+			nnewfiles="`echo $$newfiles | ${WC} -w`"; \
 			if [ "$$nnewfiles" -gt 0 ]; then \
 				${BULK_MSG} 1>&2 "Package ${PKGNAME} ($$newfiles) modified since last 'make package' re-packaging..."; \
 				uptodate=0; \

(second chunk omitted)

Now all packages are built again, even if a new enough binary package
already exists, with the message:
Package foo-1.0 (./.make.x86_64) modified since last 'make package' re-packaging...

 Thomas