diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-08 12:29:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-09 10:52:03 +0000 |
commit | 7d08a1340f4751ced35a9cf66d022f1cf0a105de (patch) | |
tree | ed6891f7c9d4848234249e72e81e8bfcb1389a0f | |
parent | a624cf7f95c8cf4ff764cc997fd1db4601b97dcc (diff) | |
download | poky-7d08a1340f4751ced35a9cf66d022f1cf0a105de.tar.gz |
glibc-package: Avoid race sstate races with do_stash_locale
The change to make do_stash_locale an sstate task between do_install and
do_package has some unforeseen problems since the function deletes part of
${D} but may or may not run depending on whether the task is installed from
sstate.
This cleans up the current "pre packaging" function to be more deterministic
and result in the same set of files, whichever code path we end up reaching
that point by. Its not an ideal sitation but it should avoid the race
failures we've seen on some builds.
(From OE-Core rev: 2a60bba00da9c4e2b1a1ce30e509dba82cc6c94a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/glibc/glibc-package.inc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc index 557b9589bc..f0fc9c1cc4 100644 --- a/meta/recipes-core/glibc/glibc-package.inc +++ b/meta/recipes-core/glibc/glibc-package.inc | |||
@@ -192,18 +192,23 @@ python do_stash_locale_setscene () { | |||
192 | } | 192 | } |
193 | addtask do_stash_locale_setscene | 193 | addtask do_stash_locale_setscene |
194 | 194 | ||
195 | PACKAGE_PREPROCESS_FUNCS += "glibc_package_preprocess" | 195 | do_poststash_install_cleanup () { |
196 | 196 | # Remove all files which do_stash_locale would remove (mv) | |
197 | glibc_package_preprocess () { | 197 | # since that task could have come from sstate and not get run. |
198 | for i in ${bashscripts}; do | 198 | for i in ${bashscripts}; do |
199 | rm -f ${PKGD}${bindir}/$i | 199 | rm -f ${D}${bindir}/$i |
200 | done | 200 | done |
201 | rm -rf ${PKGD}/${localedir} | 201 | rm -f ${D}${bindir}/localedef |
202 | rm -rf ${D}${datadir}/i18n | ||
203 | rm -rf ${D}${libdir}/gconv | ||
204 | rm -rf ${D}/${localedir} | ||
205 | rm -rf ${D}${datadir}/locale | ||
202 | if [ "${libdir}" != "${exec_prefix}/lib" ]; then | 206 | if [ "${libdir}" != "${exec_prefix}/lib" ]; then |
203 | # This dir only exists to hold locales | 207 | # This dir only exists to hold locales |
204 | rm -rf ${PKGD}${exec_prefix}/lib | 208 | rm -rf ${D}${exec_prefix}/lib |
205 | fi | 209 | fi |
206 | } | 210 | } |
211 | addtask do_poststash_install_cleanup after do_stash_locale do_install before do_populate_sysroot do_package | ||
207 | 212 | ||
208 | pkg_postinst_nscd () { | 213 | pkg_postinst_nscd () { |
209 | if [ -z "$D" ]; then | 214 | if [ -z "$D" ]; then |