diff options
author | Fabien Proriol <Fabien.Proriol@jdsu.com> | 2012-10-16 14:32:30 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-27 09:44:59 +0100 |
commit | 32cec3214f7b85457ace98debbbdb687dfac1462 (patch) | |
tree | f04a594d8854dbcbbba98208ec8078f742251067 | |
parent | 39e8e068c572b62e9a949c6402492092275e5bbe (diff) | |
download | poky-32cec3214f7b85457ace98debbbdb687dfac1462.tar.gz |
populate_sdk_base: allow SDK path of various level
In the previous version, tar extraction use the --strip-component
option with "4" hard coded value.
If we set another SDKPATH, with a different depth, the sdk installation
fails.
This patch computes the level from the SDKPATH value.
(From OE-Core rev: 7aee4e9438755c230e1399bd5226d6c8e7fcca31)
Signed-off-by: Fabien Proriol <fabien.proriol@jdsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/populate_sdk_base.bbclass | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index 2fe7f15370..a3ac757b23 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass | |||
@@ -119,6 +119,7 @@ fakeroot create_shar() { | |||
119 | #!/bin/bash | 119 | #!/bin/bash |
120 | 120 | ||
121 | DEFAULT_INSTALL_DIR="${SDKPATH}" | 121 | DEFAULT_INSTALL_DIR="${SDKPATH}" |
122 | COMPONENTS_LEN=$(echo ".${SDKPATH}" | sed "s/\// /g" | wc -w) | ||
122 | 123 | ||
123 | printf "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " | 124 | printf "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " |
124 | read target_sdk_dir | 125 | read target_sdk_dir |
@@ -155,7 +156,7 @@ fi | |||
155 | payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1)) | 156 | payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1)) |
156 | 157 | ||
157 | printf "Extracting SDK..." | 158 | printf "Extracting SDK..." |
158 | tail -n +$payload_offset $0| tar xj --strip-components=4 -C $target_sdk_dir | 159 | tail -n +$payload_offset $0| tar xj --strip-components=$COMPONENTS_LEN -C $target_sdk_dir |
159 | echo "done" | 160 | echo "done" |
160 | 161 | ||
161 | printf "Setting it up..." | 162 | printf "Setting it up..." |