summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2013-03-15 18:01:53 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-16 17:16:46 +0000
commit239a43fc4037bfe941bb60dd077ee477de177b7c (patch)
tree4ee08d013adec5ab2b7b11e710780614ec553dd5 /meta/classes
parentc5c135bc5e71a6f9b14f249358bf5d217050ee55 (diff)
downloadopenembedded-core-239a43fc4037bfe941bb60dd077ee477de177b7c.tar.gz
openembedded-core-239a43fc4037bfe941bb60dd077ee477de177b7c.tar.bz2
openembedded-core-239a43fc4037bfe941bb60dd077ee477de177b7c.zip
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. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/populate_sdk_base.bbclass10
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
# replace ${SDKPATH} with the new prefix in all text files: configs/scripts/etc
$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"
+# change all symlinks pointing to ${SDKPATH}
+for l in $($SUDO_EXEC find $native_sysroot -type l); do
+ $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l
+done
+
# find out all perl scripts in $native_sysroot and modify them replacing the
# host perl with SDK perl.
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
"s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script
done
-# change all symlinks pointing to ${SDKPATH}
-for l in $($SUDO_EXEC find $native_sysroot -type l); do
- $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l
-done
-
echo done
# delete the relocating script, so that user is forced to re-run the installer