[oe-commits] [openembedded-core] 05/12: glibc-package: fix locale cleanup logic
git at git.openembedded.org
git at git.openembedded.org
Thu Mar 29 14:00:30 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 6a7b5e5de449aa8a642d9fe4eefc9c80ac4da954
Author: Koen Kooi <koen at dominion.thruhere.net>
AuthorDate: Tue Mar 27 09:04:16 2018 +0200
glibc-package: fix locale cleanup logic
If ${libdir} is a subdirectory of ${prefix}/lib, e.g. /usr/lib/aarch64-linux, the cleanup logic will delete libc.so.
This bit of code was added in 2012 (git show b744f4cc) to remove /usr/lib/locale, this commit makes it remove that directory recursively and afterwards remove /usr/lib, erroring out if it's non-empty.
Tested with a plain (/usr/lib), a 64-bit (/usr/lib64) and a multiarch (/usr/lib/aarch64-linux) build. I strongly suspect this whole bit of cleanup isn't needed anymore, but my testing is too limited to be certain.
Signed-off-by: Koen Kooi <koen.kooi at linaro.org>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/recipes-core/glibc/glibc-package.inc | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index 824b185..ff45dfe 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -207,8 +207,11 @@ do_poststash_install_cleanup () {
rm -rf ${D}/${localedir}
rm -rf ${D}${datadir}/locale
if [ "${libdir}" != "${exec_prefix}/lib" ]; then
- # This dir only exists to hold locales
- rm -rf ${D}${exec_prefix}/lib
+ if [ -d ${D}${exec_prefix}/lib/locale ] ; then
+ rm -rf ${D}${exec_prefix}/lib/locale
+ # error out if directory isn't empty
+ rm -f ${D}${exec_prefix}/lib
+ fi
fi
}
addtask do_poststash_install_cleanup after do_stash_locale do_install before do_populate_sysroot do_package
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list