From 4c56903824e633077fc35af64307e886f869bcb5 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Mon, 18 Feb 2019 08:08:07 +0100 Subject: libc-package.bbclass: Only extract wanted files in prep_locale_tree() 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. (From OE-Core rev: 0bfc4dd0a9acc305b78fe9d5c2a7fb9afe708684) Signed-off-by: Peter Kjellerstedt Signed-off-by: Richard Purdie --- meta/classes/libc-package.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'meta/classes/libc-package.bbclass') diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass index 60000a9547..cf0d8901e3 100644 --- a/meta/classes/libc-package.bbclass +++ b/meta/classes/libc-package.bbclass @@ -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 -- cgit v1.2.3-54-g00ecf