]> code.ossystems Code Review - openembedded-core.git/commitdiff
populate_sdk_base.bbclass: fix SDK relocation issues
authorLaurentiu Palcu <laurentiu.palcu@intel.com>
Fri, 17 Aug 2012 10:38:09 +0000 (13:38 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 17 Aug 2012 12:06:09 +0000 (13:06 +0100)
The problem appears if multiple setup environment scripts are found. In
order to find only the script we're interested in, I removed globbing in
matching pattern with ${REAL_MULTIMACH_TARGET_SYS} that will be expanded
to the correct string.

Also, fix a problem when changing the scripts/configs. The grep pattern
matched also files that contained "text" in their name.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/populate_sdk_base.bbclass

index 0d1974141bd67956a83e8eb039f0833f9e37ff57..a1cb12a24a86b38819bea8ee75b50e49bcfc6227 100644 (file)
@@ -154,7 +154,7 @@ echo "done"
 
 echo -n "Setting it up..."
 # fix environment paths
-env_setup_script=$(find $target_sdk_dir -name "environment-setup*")
+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
@@ -168,7 +168,7 @@ if [ $? -ne 0 ]; then
 fi
 
 # replace ${SDKPATH} with the new prefix in all text files: configs/scripts/etc
-find $native_sysroot -type f -exec file '{}' \;|grep text|cut -d':' -f1|xargs sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g"
+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"
 
 echo done