]> code.ossystems Code Review - openembedded-core.git/commitdiff
libc-package.bbclass: Only extract wanted files in prep_locale_tree()
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Mon, 18 Feb 2019 07:08:07 +0000 (08:08 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 19 Feb 2019 15:59:09 +0000 (15:59 +0000)
prep_locale_tree() predates the usrmerge DISTRO_FEATURE, which meant it
was not prepared for the case when ${base_libdir} == ${libdir}. This
lead to it extracting files and directories where it shouldn't.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/libc-package.bbclass

index 60000a954726f9ec7d1006459c895de661d9db32..cf0d8901e3c94d4c42b733685bddf4afbbc6b8c7 100644 (file)
@@ -67,7 +67,12 @@ do_prep_locale_tree() {
        for i in $treedir/${datadir}/i18n/charmaps/*gz; do 
                gunzip $i
        done
-       tar -cf - -C ${LOCALETREESRC}${base_libdir} -p . | tar -xf - -C $treedir/${base_libdir}
+       # The extract pattern "./l*.so*" is carefully selected so that it will
+       # match ld*.so and lib*.so*, but not any files in the gconv directory
+       # (if it exists). This makes sure we only unpack the files we need.
+       # This is important in case usrmerge is set in DISTRO_FEATURES, which
+       # means ${base_libdir} == ${libdir}.
+       tar -cf - -C ${LOCALETREESRC}${base_libdir} -p . | tar -xf - -C $treedir/${base_libdir} --wildcards './l*.so*'
        if [ -f ${STAGING_LIBDIR_NATIVE}/libgcc_s.* ]; then
                tar -cf - -C ${STAGING_LIBDIR_NATIVE} -p libgcc_s.* | tar -xf - -C $treedir/${base_libdir}
        fi