Subject: inconsistent awk pattern order for print-PLIST
To: None <tech-pkg@NetBSD.org>
From: Min Sik Kim <minskim@NetBSD.org>
List: tech-pkg
Date: 05/02/2006 19:33:32
--Apple-Mail-4-812688051
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

Hi,

I found that mk/plist/print-plist.mk handles directories and files  
differently when it generates PLIST.  For files, PRINT_PLIST_AWK is  
applied *after* _PLIST_PLIST_AWK_SUBST, while it is applied *before*  
_PLIST_PLIST_AWK_SUBST for directories.  Because of this, replacing  
RUBY_SITEARCHLIBDIR in lang/ruby/modules.mk doesn't work for files.   
Is it okay to change the order for files (see the attached patch) so  
that PRINT_PLIST_AWK is always applied before _PLIST_PLIST_AWK_SUBST,  
or could it have any side effects?

Regards,
Min


--Apple-Mail-4-812688051
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="plist.diff"
Content-Disposition: attachment;
	filename=plist.diff

Index: print-plist.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/plist/print-plist.mk,v
retrieving revision 1.6
diff -u -r1.6 print-plist.mk
--- print-plist.mk	17 Apr 2006 06:12:46 -0000	1.6
+++ print-plist.mk	3 May 2006 02:30:32 -0000
@@ -126,6 +126,7 @@
 	 | ${AWK} '							\
 		{ sub("${PREFIX}/\\./", ""); }				\
 		${_PRINT_PLIST_AWK_IGNORE} { next; } 			\
+		${PRINT_PLIST_AWK}					\
 		${_PRINT_PLIST_AWK_SUBST}				\
 		/^@/ { print $$0; next }				\
 		/.*\/lib[^\/]+\.so\.[0-9]+\.[0-9]+\.[0-9]+$$/ { 	\
@@ -146,7 +147,6 @@
 			if ('$$genlinks') print $$0;			\
 			next;						\
 		}							\
-		${PRINT_PLIST_AWK}					\
 		{ print $$0; }'
 	${_PKG_SILENT}${_PKG_DEBUG}\
 	for i in `${_PRINT_PLIST_DIRS_CMD}				\

--Apple-Mail-4-812688051--