diff options
author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2012-12-06 15:16:32 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-06 16:36:07 +0000 |
commit | ade680a28f7eaddb367a0ac98c4a6423e6ab5698 (patch) | |
tree | 56a96b0e650c1d128bdb06efd3920a0484eb8102 /meta/classes/populate_sdk_base.bbclass | |
parent | 0b5772c7f987abeb73c6297bd12a9cfd80c4be61 (diff) | |
download | poky-ade680a28f7eaddb367a0ac98c4a6423e6ab5698.tar.gz |
populate_sdk_base, adt_installer_internal: fix issue on older distributions
This patch addresses an SDK installer issue on older distributions if
the installation takes place in another directory than the default one. In
fact, is all about the 'file' utility version used for determining if a
file is a text file. For example, for a perl script, newer 'file' versions
return:
"...script, ASCII text executable"
while older versions return:
"...script text executable"
Hence the regex pattern didn't match the scripts.
Also the patch contains two unrelated minor fixes:
* return an exit code of 1 instead of -1 when installation machine is
not supported. That because on an older distribution we also get this
error message: "exit: 9: Illegal number: -1";
* remove unnecessary $SUDO_EXEC prefix to grep;
[YOCTO #3538]
(From OE-Core rev: e7e23a1e5aae4028e21e37ec09e9d431a9adfbcb)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/populate_sdk_base.bbclass')
-rw-r--r-- | meta/classes/populate_sdk_base.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index c15a4d4629..88bcb27757 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass | |||
@@ -123,7 +123,7 @@ SDK_ARCH=$(echo ${SDK_ARCH} | sed -e "s/i[5-6]86/ix86/") | |||
123 | 123 | ||
124 | if [ "$INST_ARCH" != "$SDK_ARCH" ]; then | 124 | if [ "$INST_ARCH" != "$SDK_ARCH" ]; then |
125 | echo "Error: Installation machine not supported!" | 125 | echo "Error: Installation machine not supported!" |
126 | exit -1 | 126 | exit 1 |
127 | fi | 127 | fi |
128 | 128 | ||
129 | DEFAULT_INSTALL_DIR="${SDKPATH}" | 129 | DEFAULT_INSTALL_DIR="${SDKPATH}" |
@@ -233,7 +233,7 @@ if [ $? -ne 0 ]; then | |||
233 | fi | 233 | fi |
234 | 234 | ||
235 | # replace ${SDKPATH} with the new prefix in all text files: configs/scripts/etc | 235 | # replace ${SDKPATH} with the new prefix in all text files: configs/scripts/etc |
236 | $SUDO_EXEC find $native_sysroot -type f -exec file '{}' \;|$SUDO_EXEC grep ":.*ASCII.*text"|cut -d':' -f1|$SUDO_EXEC xargs sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" | 236 | $SUDO_EXEC find $native_sysroot -type f -exec file '{}' \;|grep ":.*\(ASCII\|script\).*text"|cut -d':' -f1|$SUDO_EXEC xargs sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" |
237 | 237 | ||
238 | # change all symlinks pointing to ${SDKPATH} | 238 | # change all symlinks pointing to ${SDKPATH} |
239 | for l in $($SUDO_EXEC find $native_sysroot -type l); do | 239 | for l in $($SUDO_EXEC find $native_sysroot -type l); do |