From patchwork Thu Jan 12 16:30:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: perl: do not use 'grep -r' Date: Thu, 12 Jan 2012 16:30:23 -0000 From: Enrico Scholz X-Patchwork-Id: 19185 Message-Id: <1326385824-32201-4-git-send-email-enrico.scholz@sigma-chemnitz.de> To: openembedded-core@lists.openembedded.org Cc: Enrico Scholz , Enrico Scholz From: Enrico Scholz '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 --- 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