diff options
author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2013-03-15 18:01:53 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-16 17:53:59 +0000 |
commit | a6e575292f5e84344bcc2f38ff1f09d9087d25eb (patch) | |
tree | 06ed189dd33342e5a7580a5c6a3986fb7958c76b | |
parent | 2c201656eb6c63758218ab90899162f20e0691c9 (diff) | |
download | poky-a6e575292f5e84344bcc2f38ff1f09d9087d25eb.tar.gz |
populate_sdk_base: search for perl scripts after symlinks are relocated
grep will throw "No such file or directory" errors for all invalid
symlinks. To overcome this, move the search after the symlinks have been
changed to point to the new location.
(From OE-Core rev: 239a43fc4037bfe941bb60dd077ee477de177b7c)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/populate_sdk_base.bbclass | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index 7af2d2e9e2..4015030914 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass | |||
@@ -269,6 +269,11 @@ fi | |||
269 | # replace ${SDKPATH} with the new prefix in all text files: configs/scripts/etc | 269 | # replace ${SDKPATH} with the new prefix in all text files: configs/scripts/etc |
270 | $SUDO_EXEC find $native_sysroot -type f -exec file '{}' \;|grep ":.*\(ASCII\|script\|source\).*text"|cut -d':' -f1|$SUDO_EXEC xargs sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" | 270 | $SUDO_EXEC find $native_sysroot -type f -exec file '{}' \;|grep ":.*\(ASCII\|script\|source\).*text"|cut -d':' -f1|$SUDO_EXEC xargs sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" |
271 | 271 | ||
272 | # change all symlinks pointing to ${SDKPATH} | ||
273 | for l in $($SUDO_EXEC find $native_sysroot -type l); do | ||
274 | $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l | ||
275 | done | ||
276 | |||
272 | # find out all perl scripts in $native_sysroot and modify them replacing the | 277 | # find out all perl scripts in $native_sysroot and modify them replacing the |
273 | # host perl with SDK perl. | 278 | # host perl with SDK perl. |
274 | for perl_script in $($SUDO_EXEC grep "^#!.*perl" -rl $native_sysroot); do | 279 | for perl_script in $($SUDO_EXEC grep "^#!.*perl" -rl $native_sysroot); do |
@@ -276,11 +281,6 @@ for perl_script in $($SUDO_EXEC grep "^#!.*perl" -rl $native_sysroot); do | |||
276 | "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script | 281 | "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script |
277 | done | 282 | done |
278 | 283 | ||
279 | # change all symlinks pointing to ${SDKPATH} | ||
280 | for l in $($SUDO_EXEC find $native_sysroot -type l); do | ||
281 | $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l | ||
282 | done | ||
283 | |||
284 | echo done | 284 | echo done |
285 | 285 | ||
286 | # delete the relocating script, so that user is forced to re-run the installer | 286 | # delete the relocating script, so that user is forced to re-run the installer |