diff options
author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2012-09-17 11:19:08 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-21 11:10:05 +0100 |
commit | 9e6a25e2e9a7f37c3baa0b2949a43ac4127868da (patch) | |
tree | 402a9fe56a74fa26f510decfc888b5cd37449169 /meta/classes | |
parent | 3396545467df05421c3adeb4b5ec532fa95dcb06 (diff) | |
download | openembedded-core-9e6a25e2e9a7f37c3baa0b2949a43ac4127868da.tar.gz openembedded-core-9e6a25e2e9a7f37c3baa0b2949a43ac4127868da.tar.bz2 openembedded-core-9e6a25e2e9a7f37c3baa0b2949a43ac4127868da.zip |
SDK: fix installation into symlinked directories
The SDK installation scripts should not canonicalize symlinked
directories because the entire relocation would be done to the directory
to which the symlink points. Instead, if the installation is a symlink,
use that path to relocate the binaries.
For example, if we have the following symlink: /opt/sdk -> ~/my/test/sdk
the binaries will be relocated to /opt/sdk not ~/my/test/sdk as it is
done now.
[YOCTO #3102]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/populate_sdk_base.bbclass | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index 2bff41f9e6..1b55e70e67 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass @@ -126,7 +126,11 @@ if [ "$target_sdk_dir" = "" ]; then fi eval target_sdk_dir=$target_sdk_dir -target_sdk_dir=$(readlink -m $target_sdk_dir) +if [ -d $target_sdk_dir ]; then + target_sdk_dir=$(cd $target_sdk_dir; pwd) +else + target_sdk_dir=$(readlink -m $target_sdk_dir) +fi printf "You are about to install Poky SDK to \"$target_sdk_dir\". Proceed[Y/n]?" read answer @@ -154,7 +158,7 @@ echo "done" printf "Setting it up..." # fix environment paths -env_setup_script=$(find $target_sdk_dir -name "environment-setup-${REAL_MULTIMACH_TARGET_SYS}") +env_setup_script=$(find $target_sdk_dir/ -name "environment-setup-${REAL_MULTIMACH_TARGET_SYS}") sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" -i $env_setup_script # fix dynamic loader paths in all ELF SDK binaries |