diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-28 17:55:05 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-15 09:55:31 +0100 |
commit | b2f045c400fa8bd20b319c60137b1575f967cef1 (patch) | |
tree | 58138027b1c12b236c56b105330817bf9ee29966 /meta | |
parent | 87671f72e7459d5d5ddb37691354fab970c557ee (diff) | |
download | poky-b2f045c400fa8bd20b319c60137b1575f967cef1.tar.gz |
populate_sdk_base: Fix grep command usage on old hosts
"man grep" on centos:
-R, -r, --recursive
Read all files under each directory, recursively; this is equivalent to the -d recurse option.
"man grep" on a more recent ubuntu system:
-r, --recursive
Read all files under each directory, recursively, following symbolic links only if they are on the command line. This
is equivalent to the -d recurse option.
So we have an issue when the SDK installer (even with
buildtools-tarball) is used on old hosts since it may try and
dereference paths which it should not. This is caused by differences in
the behaviour of grep -r on older systems.
The fix is to wrap this in find so that only real files are found (as
elsewhere in the script.
[YOCTO #6577]
(From OE-Core rev: 7986adeac16550b33f65fded39a55f668e0e543f)
(From OE-Core rev: 11e83000b164340b7e261a62f074a0e0cb6d6282)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/populate_sdk_base.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index 10d04edc63..22b8254c3a 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass | |||
@@ -284,7 +284,7 @@ done | |||
284 | 284 | ||
285 | # find out all perl scripts in $native_sysroot and modify them replacing the | 285 | # find out all perl scripts in $native_sysroot and modify them replacing the |
286 | # host perl with SDK perl. | 286 | # host perl with SDK perl. |
287 | for perl_script in $($SUDO_EXEC grep "^#!.*perl" -rl $native_sysroot); do | 287 | for perl_script in $($SUDO_EXEC find $native_sysroot -type f -exec grep "^#!.*perl" -l '{}' \;); do |
288 | $SUDO_EXEC sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \ | 288 | $SUDO_EXEC sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \ |
289 | "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script | 289 | "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script |
290 | done | 290 | done |