[oe-commits] Laurentiu Palcu : SDK: relocate symlinks too

git at git.openembedded.org git at git.openembedded.org
Fri Sep 21 10:18:13 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: 6e4923c0c9b218271fd44d78df9987b5cabb1c03
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6e4923c0c9b218271fd44d78df9987b5cabb1c03

Author: Laurentiu Palcu <laurentiu.palcu at intel.com>
Date:   Thu Sep 20 14:58:48 2012 +0300

SDK: relocate symlinks too

The directory usr/libexec/ in the SDK sysroot contains the default
symlinks to the toolchain binaries and these, too, need to point to the
correct toolchain path.

[YOCTO #3090]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu at intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/classes/populate_sdk_base.bbclass             |    5 +++++
 .../adt-installer/scripts/adt_installer_internal   |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 10f3975..42c0d39 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -174,6 +174,11 @@ fi
 # replace ${SDKPATH} with the new prefix in all text files: configs/scripts/etc
 find $native_sysroot -type f -exec file '{}' \;|grep ":.*ASCII.*text"|cut -d':' -f1|xargs sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g"
 
+# change all symlinks pointing to ${SDKPATH}
+for l in $(find $native_sysroot -type l); do
+	ln -sf $(readlink $l|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
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 fbcd2ce..63fcf60 100755
--- a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
+++ b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
@@ -215,6 +215,11 @@ $SUDO sed -i -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:g" $env_setup_scr
 find $OECORE_NATIVE_SYSROOT -type f -exec file '{}' \;|grep ":.*ASCII.*text"|cut -d':' -f1|\
     xargs $SUDO sed -i -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:g"
 
+# change all symlinks pointing to /opt/${DISTRO}/${SDK_VERSION}
+for l in $(find $NATIVE_INSTALL_DIR -type l); do
+	ln -sf $(readlink $l|sed -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:") $l
+done
+
 echo_info "\nSuccessfully installed selected native ADT!"
 }
 





More information about the Openembedded-commits mailing list