[OE-core] [PATCH 1/1] perl: fix re-execution of patch/configure

Enrico Scholz enrico.scholz at sigma-chemnitz.de
Wed Apr 18 15:48:00 UTC 2012


Paul Eggleton <paul.eggleton-VuQAYsv1563Yd54FQh9/CA at public.gmane.org>
writes:

> -        for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do
> +        for foo in `grep -I --exclude="*.patch" --exclude="*.diff" --exclude="*.pod" --exclude="README*" -m1 "/usr/include/.*\.h" ${WORKDIR}/* -r -l` ${S}/utils/h2xs.PL ; do

It would be much better to replace the 'grep -r' by 'find -type f ... |
xargs grep'.  'grep -r' is very bad because:

* '-r' is not standardized

* it can return symlinks which might point to read-only locations
  (e.g. patches/config.sh* are such links).  'sed -i' on such files
  can make the build fail.


Enrico




More information about the Openembedded-core mailing list