diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2013-01-19 09:18:50 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-20 12:58:58 +0000 |
commit | 63ccf6242064055e280ffd05a4726f89de6b9b98 (patch) | |
tree | 139b03db6bdd4786c95288d3741b715fb92ec7bf /meta/classes/populate_sdk_base.bbclass | |
parent | 116fb4a72f352623b22a0c1a1a1500085f5918d3 (diff) | |
download | poky-63ccf6242064055e280ffd05a4726f89de6b9b98.tar.gz |
populate_sdk_base.bbclass: Work around bugs with gnu tar < 1.24
The gnu tar versions less than 1.24 pose a problem with the SDK
extraction. A typical SDK will have hard links. The SDK is created
with a newer version of tar but extracted with the host version of tar
which may be much older. The specific defect is that older version of
gnu tar do not properly handle the "--strip-components=" argument when
processing hard links and the paths do not get properly truncated and
hooked up with the corresponding real file payloads. This leads to
errors like the following during the SDK install:
tar: sysroots/qemux86-yocto-linux/usr/bin/getconf: Cannot hard link to `./opt/yocto/SDK-qemux86/sysroots/qemux86-yocto-linux/usr/bin/POSIX_V6_ILP32_OFFBIG': No such file or directory
The simple way to work around the problem is to just not save the path
information that is going to get chopped off anyway. This has the
added benefit that it saves a small amount of space in the tar archive
as well.
(From OE-Core rev: 0f4112016bac07f0294f2a4d0fde4659c0fed2d2)
Signed-off-by: Jason Wessel <jason.wessel@windriver.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 | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index c1756e8c87..da846b40ca 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass | |||
@@ -113,7 +113,7 @@ fakeroot create_sdk_files() { | |||
113 | fakeroot tar_sdk() { | 113 | fakeroot tar_sdk() { |
114 | # Package it up | 114 | # Package it up |
115 | mkdir -p ${SDK_DEPLOY} | 115 | mkdir -p ${SDK_DEPLOY} |
116 | cd ${SDK_OUTPUT} | 116 | cd ${SDK_OUTPUT}/${SDKPATH} |
117 | tar --owner=root --group=root -cj --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 . | 117 | tar --owner=root --group=root -cj --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 . |
118 | } | 118 | } |
119 | 119 | ||
@@ -130,7 +130,6 @@ if [ "$INST_ARCH" != "$SDK_ARCH" ]; then | |||
130 | fi | 130 | fi |
131 | 131 | ||
132 | DEFAULT_INSTALL_DIR="${SDKPATH}" | 132 | DEFAULT_INSTALL_DIR="${SDKPATH}" |
133 | COMPONENTS_LEN=$(echo ".${SDKPATH}" | sed "s/\// /g" | wc -w) | ||
134 | SUDO_EXEC="" | 133 | SUDO_EXEC="" |
135 | target_sdk_dir="" | 134 | target_sdk_dir="" |
136 | answer="" | 135 | answer="" |
@@ -212,7 +211,7 @@ fi | |||
212 | payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1)) | 211 | payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1)) |
213 | 212 | ||
214 | printf "Extracting SDK..." | 213 | printf "Extracting SDK..." |
215 | tail -n +$payload_offset $0| $SUDO_EXEC tar xj --strip-components=$COMPONENTS_LEN -C $target_sdk_dir | 214 | tail -n +$payload_offset $0| $SUDO_EXEC tar xj -C $target_sdk_dir |
216 | echo "done" | 215 | echo "done" |
217 | 216 | ||
218 | printf "Setting it up..." | 217 | printf "Setting it up..." |