Patchwork perl: do not use 'grep -r'

login
register
mail settings
Submitter Enrico Scholz
Date Jan. 12, 2012, 4:30 p.m.
Message ID <1326385824-32201-4-git-send-email-enrico.scholz@sigma-chemnitz.de>
Download mbox | patch
Permalink /patch/19185/
State New
Headers show

Comments

Enrico Scholz - Jan. 12, 2012, 4:30 p.m.
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(-)

Patch

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