[oe-commits] [openembedded-core] 34/38: glibc-package: Avoid race sstate races with do_stash_locale

git at git.openembedded.org git at git.openembedded.org
Thu Apr 5 14:14:57 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch morty
in repository openembedded-core.

commit 9660e4d75230a8aed91a2fc4c887e332f52914e2
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Feb 8 12:29:04 2017 +0000

    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 at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/recipes-core/glibc/glibc-package.inc | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index b8239e0..6f4e71d 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 () {
 }
 addtask do_stash_locale_setscene
 
-PACKAGE_PREPROCESS_FUNCS += "glibc_package_preprocess"
-
-glibc_package_preprocess () {
+do_poststash_install_cleanup () {
+	# Remove all files which do_stash_locale would remove (mv)
+	# since that task could have come from sstate and not get run.
 	for i in ${bashscripts}; do
-	    rm -f ${PKGD}${bindir}/$i
+	    rm -f ${D}${bindir}/$i
 	done
-	rm -rf ${PKGD}/${localedir}
+	rm -f ${D}${bindir}/localedef
+	rm -rf ${D}${datadir}/i18n
+	rm -rf ${D}${libdir}/gconv
+	rm -rf ${D}/${localedir}
+	rm -rf ${D}${datadir}/locale
 	if [ "${libdir}" != "${exec_prefix}/lib" ]; then
 		# This dir only exists to hold locales
-		rm -rf ${PKGD}${exec_prefix}/lib
+		rm -rf ${D}${exec_prefix}/lib
 	fi
 }
+addtask do_poststash_install_cleanup after do_stash_locale do_install before do_populate_sysroot do_package
 
 pkg_postinst_nscd () {
 	if [ -z "$D" ]; then

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list