This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] cygport, find ... -exec


Usually, the 'find ... -exec cmd ...' idiom makes a lot of sense -- it's faster, one fewer forks (maybe MANY fewer), etc.

However, you sometimes run into troubles with extremely long filelists. As I did with ncurses (1183 files in the build/ directory) -- and I got a 'too many files' error from touch resulting from this command in __prepinstalldirs:

find ${B} -type f -exec touch -t $(date +%Y%m%d%H%M.%S) '{}' +;


The attached patch reverts to using -print0 | xargs -0 instead of -exec.


--
Chuck
Index: bin/cygport.in
===================================================================
RCS file: /cvsroot/cygwin-ports/cygport/bin/cygport.in,v
retrieving revision 1.29
diff -u -r1.29 cygport.in
--- bin/cygport.in	30 Oct 2006 06:09:47 -0000	1.29
+++ bin/cygport.in	15 Nov 2006 07:28:09 -0000
@@ -873,7 +873,7 @@
 
 	# circumvent pointless libtool relinking during install
 	find ${B} -name '*.la' -exec sed -i -e 's!^relink_command=.*!!' '{}' +;
-	find ${B} -type f -exec touch -t $(date +%Y%m%d%H%M.%S) '{}' +;
+	find ${B} -type f -print0 | xargs -0 touch -t $(date +%Y%m%d%H%M.%S)
 }
 
 # run 'make install'

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]