Subject: Re: Ignoring patch files with missing checksums
To: Matthias Scheler <tron@zhadum.org.uk>
From: Geert Hendrickx <ghen@telenet.be>
List: tech-pkg
Date: 06/08/2007 14:27:57
On Fri, Jun 08, 2007 at 11:38:05AM +0100, Matthias Scheler wrote:
> I would like to change "pkgsrc/mk/patch.mk" to return an error if it
> encounters an patch file that is not recorded in "distinfo" and
> "PKG_DEVELOPER" is set to "yes".

Why not check for it always?  We have LOCALPATCHES if users want to add
their own patches.

	Geert

Index: mk/patch/patch.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/patch/patch.mk,v
retrieving revision 1.11
diff -u -r1.11 patch.mk
--- mk/patch/patch.mk	22 Jul 2006 16:31:35 -0000	1.11
+++ mk/patch/patch.mk	8 Jun 2007 12:28:11 -0000
@@ -291,6 +291,7 @@
 			algsum=`${AWK} '(NF == 4) && ($$2 == "('$$filename')") && ($$3 == "=") {print $$1 " " $$4}' ${DISTINFO_FILE} || ${TRUE}`; \
 			if ${TEST} -z "$$algsum"; then			\
 				patch_warning "Ignoring patch file $$i: no checksum found"; \
+				fail="$$fail $$i";			\
 				continue;				\
 			fi;						\
 			set -- $$algsum;				\
@@ -318,7 +319,7 @@
 		fi;							\
 	done;								\
 	if ${TEST} -n "$$fail"; then					\
-		${ERROR_MSG} "Patching failed due to modified or broken patch file(s):"; \
+		${ERROR_MSG} "Patching failed due to modified, unlisted or broken patch file(s):"; \
 		for i in $$fail; do					\
 			${ERROR_MSG} "	$$i";				\
 		done;							\