From 9e6a25e2e9a7f37c3baa0b2949a43ac4127868da Mon Sep 17 00:00:00 2001 From: Laurentiu Palcu Date: Mon, 17 Sep 2012 11:19:08 +0300 Subject: 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 Signed-off-by: Saul Wold --- meta/recipes-devtools/installer/adt-installer/adt_installer | 6 +++++- .../installer/adt-installer/scripts/adt_installer_internal | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'meta/recipes-devtools/installer/adt-installer') diff --git a/meta/recipes-devtools/installer/adt-installer/adt_installer b/meta/recipes-devtools/installer/adt-installer/adt_installer index 2d252b72ad..0be5a1d607 100755 --- a/meta/recipes-devtools/installer/adt-installer/adt_installer +++ b/meta/recipes-devtools/installer/adt-installer/adt_installer @@ -340,7 +340,11 @@ if [ "$INSTALL_FOLDER" = "" ]; then fi eval INSTALL_FOLDER=$INSTALL_FOLDER -export INSTALL_FOLDER=$(readlink -m $INSTALL_FOLDER) +if [ -d $INSTALL_FOLDER ]; then + export INSTALL_FOLDER=$(cd $INSTALL_FOLDER; pwd) +else + export INSTALL_FOLDER=$(readlink -m $INSTALL_FOLDER) +fi clear diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal index f113aa4b80..76acaa7e8a 100755 --- a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal +++ b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal @@ -207,7 +207,7 @@ $SUDO scripts/relocate_sdk_tmp.py $INSTALL_FOLDER $dl_path $executable_files check_result # replace /opt/${DISTRO}/${SDK_VERSION} with the install folder in all configs -env_setup_script=$(find $NATIVE_INSTALL_DIR -name "environment-setup-*") +env_setup_script=$(find $NATIVE_INSTALL_DIR/ -name "environment-setup-*") $SUDO sed -i -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:g" $env_setup_script find $OECORE_NATIVE_SYSROOT -type f -exec file '{}' \;|grep ":.*ASCII.*text"|cut -d':' -f1|\ -- cgit 1.2.3-korg