summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2012-09-17 11:19:08 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-21 11:10:22 +0100
commitbd73a4b615f51d6a2330fcd21a33dcdd863497d2 (patch)
tree7f975a2552e1452c0c7279b47db378f7a83cd99d /meta/classes
parentb9bd372666af10f5ff0635885f23a03a0daae2b2 (diff)
downloadpoky-bd73a4b615f51d6a2330fcd21a33dcdd863497d2.tar.gz
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] (From OE-Core rev: 9e6a25e2e9a7f37c3baa0b2949a43ac4127868da) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/populate_sdk_base.bbclass8
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
126fi 126fi
127 127
128eval target_sdk_dir=$target_sdk_dir 128eval target_sdk_dir=$target_sdk_dir
129target_sdk_dir=$(readlink -m $target_sdk_dir) 129if [ -d $target_sdk_dir ]; then
130 target_sdk_dir=$(cd $target_sdk_dir; pwd)
131else
132 target_sdk_dir=$(readlink -m $target_sdk_dir)
133fi
130 134
131printf "You are about to install Poky SDK to \"$target_sdk_dir\". Proceed[Y/n]?" 135printf "You are about to install Poky SDK to \"$target_sdk_dir\". Proceed[Y/n]?"
132read answer 136read answer
@@ -154,7 +158,7 @@ echo "done"
154 158
155printf "Setting it up..." 159printf "Setting it up..."
156# fix environment paths 160# fix environment paths
157env_setup_script=$(find $target_sdk_dir -name "environment-setup-${REAL_MULTIMACH_TARGET_SYS}") 161env_setup_script=$(find $target_sdk_dir/ -name "environment-setup-${REAL_MULTIMACH_TARGET_SYS}")
158sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" -i $env_setup_script 162sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" -i $env_setup_script
159 163
160# fix dynamic loader paths in all ELF SDK binaries 164# fix dynamic loader paths in all ELF SDK binaries