Subject: bsd.pkg.patch.mk fix
To: None <tech-pkg@netbsd.org>
From: Jukka Salmi <j+nbsd@2005.salmi.ch>
List: tech-pkg
Date: 06/08/2005 11:19:12
--azLHFNyN32YCQGCU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

currently, if a patch from ${LOCALPATCHES}/... fails, the wrong filename
(or no filename at all) is printed in the error message. The attached patch
fixes this problem. Could anybody commit this? Or should I send a PR?


TIA, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~

--azLHFNyN32YCQGCU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bsd.pkg.patch.mk.diff"

--- pkgsrc/mk/bsd.pkg.patch.mk.orig	2005-06-04 22:56:47.000000000 +0200
+++ pkgsrc/mk/bsd.pkg.patch.mk	2005-06-08 11:09:29.000000000 +0200
@@ -205,6 +205,7 @@
 	patches=${_PKGSRC_PATCHES:Q};					\
 	for i in $$patches; do						\
 		${TEST} -f "$$i" || continue;				\
+		filename=`${BASENAME} $$i`;				\
 		case "$$i" in						\
 		*.orig|*.rej|*~)					\
 			${ECHO_MSG} "${_PKGSRC_IN}> Ignoring patchfile $$i"; \
@@ -219,7 +220,6 @@
 				${ECHO_MSG} "**************************************"; \
 				continue;				\
 			fi;						\
-			filename=`${BASENAME} $$i`;			\
 			algsum=`${AWK} '(NF == 4) && ($$2 == "('$$filename')") && ($$3 == "=") {print $$1 " " $$4}' ${DISTINFO_FILE} || ${TRUE}`; \
 			if ${TEST} -z "$$algsum"; then			\
 				${ECHO_MSG} "**************************************"; \

--azLHFNyN32YCQGCU--