summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2019-07-02 13:16:09 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-30 16:44:42 +0100
commit648d939192d48aec82ee0a0cf6d49af20a96e789 (patch)
tree1ed3a86874277e2618161dfa05e7d4a59afe53f7 /meta/recipes-core
parentc887c1b217238c71c90c9433cd6928b14498d5fb (diff)
downloadpoky-648d939192d48aec82ee0a0cf6d49af20a96e789.tar.gz
glibc/glibc-locale: Fix do_stash_locale to work with usrmerge and multilibs
The do_stash_locale was not working consistently across the 4 build configurations and the multilib, usrmerge configuration would fail entirely with the obscure message: | DEBUG: Executing shell function do_prep_locale_tree | tar: i18n: Cannot stat: No such file or directory | tar: Exiting with failure status due to previous errors | gzip: /poky/build/tmp/work/core2-64-poky-linux/glibc-locale/2.29-r0/locale-tree//usr/share/i18n/charmaps/*gz.gz: No such file or directory | WARNING: /poky/build/tmp/work/core2-64-poky-linux/glibc-locale/2.29-r0/temp/run.do_prep_locale_tree.124690:1 exit 1 from 'gunzip $i' Here is the 4 build configurations without the patch applied: A) x86-64 no multilibs, no usrmerge find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l 909 B) x86-64 no multilibs, usrmerge find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l 909 C) x86-64 multilibs, no usrmerge find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l 885 D) x86-64 multilibs, usrmerge find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l 864 The issue here is that all the moves should be processed first, then a copy should be made of the lib directories, but only in the case they are different when using the usrmerge feature. Even though the build worked for the multilib configuration without usrmerge, the content was not the same. After applying the patch the same number of files are in all the configurations. The list of files was also diffed, after normalizing the directory names to ensure all the correct files were copied. Ultimately there are probably additional files that should be pruned from what is copied to the stated_locale, but the purpose of this patch is make it 100% consistent between the build types and fix the builds. (From OE-Core rev: 36c223ecc5349478821a7a64a4ff14bbeae0a7da) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/glibc/glibc-package.inc19
1 files changed, 13 insertions, 6 deletions
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index a1d79b3075..ff17a193c3 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -162,21 +162,28 @@ bashscripts = "mtrace sotruss xtrace"
162do_stash_locale () { 162do_stash_locale () {
163 dest=${LOCALESTASH} 163 dest=${LOCALESTASH}
164 install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir} 164 install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir}
165 if [ "${base_libdir}" != "${libdir}" ]; then 165 # Hide away the locale data from the deployment
166 cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir}
167 fi
168 if [ -e ${D}${bindir}/localedef ]; then 166 if [ -e ${D}${bindir}/localedef ]; then
169 mv -f ${D}${bindir}/localedef ${dest}${bindir} 167 mv -f ${D}${bindir}/localedef ${dest}${bindir}
170 fi 168 fi
171 if [ -e ${D}${libdir}/gconv ]; then 169 if [ -e ${D}${libdir}/gconv ]; then
172 mv -f ${D}${libdir}/gconv ${dest}${libdir} 170 mv -f ${D}${libdir}/gconv ${dest}${libdir}
173 fi 171 fi
174 if [ -e ${D}${exec_prefix}/lib ]; then
175 cp -fpPR ${D}${exec_prefix}/lib ${dest}${exec_prefix}
176 fi
177 if [ -e ${D}${datadir}/i18n ]; then 172 if [ -e ${D}${datadir}/i18n ]; then
178 mv ${D}${datadir}/i18n ${dest}${datadir} 173 mv ${D}${datadir}/i18n ${dest}${datadir}
179 fi 174 fi
175
176 # Make a copy of all the libraries into the locale stash
177 cp -fpPR ${D}${libdir}/* ${dest}${libdir}
178 if [ "${base_libdir}" != "${libdir}" ]; then
179 cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir}
180 fi
181 if [ -e ${D}${exec_prefix}/lib ]; then
182 if [ ${exec_prefix}/lib != ${base_libdir} ] && [ ${exec_prefix}/lib != ${libdir} ]; then
183 cp -fpPR ${D}${exec_prefix}/lib ${dest}${exec_prefix}
184 fi
185 fi
186
180 cp -fpPR ${D}${datadir}/* ${dest}${datadir} 187 cp -fpPR ${D}${datadir}/* ${dest}${datadir}
181 rm -rf ${D}${datadir}/locale/ 188 rm -rf ${D}${datadir}/locale/
182 cp -fpPR ${WORKDIR}/SUPPORTED ${dest} 189 cp -fpPR ${WORKDIR}/SUPPORTED ${dest}