aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc-package.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc-package.inc')
-rw-r--r--meta/recipes-core/glibc/glibc-package.inc45
1 files changed, 28 insertions, 17 deletions
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index bad642449a..6f4e71d1de 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -145,8 +145,11 @@ do_install_append_aarch64 () {
fi
}
-do_install_locale () {
- dest=${D}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}
+LOCALESTASH = "${WORKDIR}/stashed-locale"
+bashscripts = "mtrace sotruss xtrace"
+
+do_stash_locale () {
+ dest=${LOCALESTASH}
install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir}
if [ "${base_libdir}" != "${libdir}" ]; then
cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir}
@@ -166,14 +169,8 @@ do_install_locale () {
cp -fpPR ${D}${datadir}/* ${dest}${datadir}
rm -rf ${D}${datadir}/locale/
cp -fpPR ${WORKDIR}/SUPPORTED ${dest}
-}
-
-addtask do_install_locale after do_install before do_populate_sysroot do_package
-bashscripts = "mtrace sotruss xtrace"
-
-do_evacuate_scripts () {
- target=${D}${includedir}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}
+ target=${dest}/scripts
mkdir -p $target
for i in ${bashscripts}; do
if [ -f ${D}${bindir}/$i ]; then
@@ -182,22 +179,36 @@ do_evacuate_scripts () {
done
}
-addtask evacuate_scripts after do_install before do_populate_sysroot do_package
+addtask do_stash_locale after do_install before do_populate_sysroot do_package
+do_stash_locale[dirs] = "${B}"
+do_stash_locale[cleandirs] = "${LOCALESTASH}"
+SSTATETASKS += "do_stash_locale"
+do_stash_locale[sstate-inputdirs] = "${LOCALESTASH}"
+do_stash_locale[sstate-outputdirs] = "${STAGING_DIR}-components/${PACKAGE_ARCH}/glibc-stash-locale"
+do_stash_locale[sstate-fixmedir] = "${STAGING_DIR}-components/${PACKAGE_ARCH}/glibc-stash-locale"
-PACKAGE_PREPROCESS_FUNCS += "glibc_package_preprocess"
+python do_stash_locale_setscene () {
+ sstate_setscene(d)
+}
+addtask do_stash_locale_setscene
-glibc_package_preprocess () {
- rm -rf ${PKGD}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}
- rm -rf ${PKGD}/${includedir}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}
+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