diff options
author | Qi.Chen@windriver.com <Qi.Chen@windriver.com> | 2015-09-07 13:42:21 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-09 14:27:41 +0100 |
commit | 479deeb3f12bf638d7d4bf80d17bd99919847152 (patch) | |
tree | 76a700edf4a9e33b188ba4d7df8452d573747f96 /meta/classes/populate_sdk_ext.bbclass | |
parent | 16d0df58d1c1e5798f71e402a862a9f782577e60 (diff) | |
download | poky-479deeb3f12bf638d7d4bf80d17bd99919847152.tar.gz |
populate_sdk_ext: install the latest buildtools-tarball
If we do `bitbake buildtools-tarball' and then after one day do `bitbake
core-image-minimal -c populate_sdk_ext', we would meet errors like below.
| install: cannot stat '/buildarea2/chenqi/poky/build-systemd/tmp/deploy/sdk/
poky-glibc-x86_64-buildtools-tarball-core2-64-buildtools-nativesdk-standalone
-1.8+snapshot-20150429.sh': No such file or directory
The problem is that the output name for buildtools-tarball has ${DATE} in it.
So if populate_sdk_ext task is executed but buildtools-tarball is not rebuilt,
the above error appears.
Instead of hardcoding ${DISTRO_VERSION} which consists of ${DATE} in the
install_tools() function, we should find the latest buildtools-tarball based
on the modification time and install it.
[YOCTO #7674]
(From OE-Core rev: fa708504d71e0b01ee97a172ac17ad16a9e3b897)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/populate_sdk_ext.bbclass')
-rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index 8509f0c25b..5dd60515d5 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
@@ -163,13 +163,21 @@ python copy_buildsystem () { | |||
163 | pass | 163 | pass |
164 | } | 164 | } |
165 | 165 | ||
166 | def extsdk_get_buildtools_filename(d): | ||
167 | # This is somewhat of a hack | ||
168 | localdata = bb.data.createCopy(d) | ||
169 | localdata.setVar('PN', 'buildtools-tarball') | ||
170 | return localdata.expand('${SDK_NAME}-buildtools-nativesdk-standalone-*.sh') | ||
171 | |||
166 | install_tools() { | 172 | install_tools() { |
167 | install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk} | 173 | install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk} |
168 | lnr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/devtool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/devtool | 174 | lnr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/devtool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/devtool |
169 | lnr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/recipetool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/recipetool | 175 | lnr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/recipetool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/recipetool |
170 | touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase | 176 | touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase |
171 | 177 | ||
172 | install ${SDK_DEPLOY}/${DISTRO}-${TCLIBC}-${SDK_ARCH}-buildtools-tarball-${TUNE_PKGARCH}-buildtools-nativesdk-standalone-${DISTRO_VERSION}.sh ${SDK_OUTPUT}/${SDKPATH} | 178 | # find latest buildtools-tarball and install it |
179 | buildtools_path=`ls -t1 ${SDK_DEPLOY}/${@extsdk_get_buildtools_filename(d)} | head -n1` | ||
180 | install $buildtools_path ${SDK_OUTPUT}/${SDKPATH} | ||
173 | 181 | ||
174 | install ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 ${SDK_OUTPUT}/${SDKPATH} | 182 | install ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 ${SDK_OUTPUT}/${SDKPATH} |
175 | } | 183 | } |