All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perl: do not use 'grep -r'
@ 2012-01-12 16:30 Enrico Scholz
  0 siblings, 0 replies; only message in thread
From: Enrico Scholz @ 2012-01-12 16:30 UTC (permalink / raw)
  To: openembedded-core; +Cc: Enrico Scholz, Enrico Scholz

From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>

'grep -r' will return symlinks (e.g. from the patches/ directory) and it
would be wrong to modify them with sed.  Such a modification might fail
and break the buildprocess when symlink target is not writable by the
build user.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
 meta/recipes-devtools/perl/perl_5.14.2.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb
index 0abefe4..abf720c 100644
--- a/meta/recipes-devtools/perl/perl_5.14.2.bb
+++ b/meta/recipes-devtools/perl/perl_5.14.2.bb
@@ -163,7 +163,7 @@ do_configure() {
 			;;
 	esac
         # These are strewn all over the source tree
-        for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do
+        for foo in `find ${WORKDIR} -type f -print0 | xargs -0 grep -I -m1 \/usr\/include\/.*\\.h | cut -f 1 -d ":"` ; do
             echo Fixing: $foo
             sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
         done
-- 
1.7.7.5




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-12 16:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-12 16:30 [PATCH] perl: do not use 'grep -r' Enrico Scholz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.