diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2018-03-27 09:04:16 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-30 00:31:18 +0100 |
commit | 826a04a1884f6c7acc82ef1cf6935710711e67b5 (patch) | |
tree | 21389b378df92cc3031666613ca867b9b45b3fb8 /meta | |
parent | 697e36fb75c10bd73f09415ede699e64bf18ea74 (diff) | |
download | poky-826a04a1884f6c7acc82ef1cf6935710711e67b5.tar.gz |
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.
(From OE-Core rev: d8f4c7794f15f7071ee8e621d7964cb4b4134630)
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/glibc/glibc-package.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc index 824b185b3a..ff45dfe35a 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 () { | |||
207 | rm -rf ${D}/${localedir} | 207 | rm -rf ${D}/${localedir} |
208 | rm -rf ${D}${datadir}/locale | 208 | rm -rf ${D}${datadir}/locale |
209 | if [ "${libdir}" != "${exec_prefix}/lib" ]; then | 209 | if [ "${libdir}" != "${exec_prefix}/lib" ]; then |
210 | # This dir only exists to hold locales | 210 | if [ -d ${D}${exec_prefix}/lib/locale ] ; then |
211 | rm -rf ${D}${exec_prefix}/lib | 211 | rm -rf ${D}${exec_prefix}/lib/locale |
212 | # error out if directory isn't empty | ||
213 | rm -f ${D}${exec_prefix}/lib | ||
214 | fi | ||
212 | fi | 215 | fi |
213 | } | 216 | } |
214 | addtask do_poststash_install_cleanup after do_stash_locale do_install before do_populate_sysroot do_package | 217 | addtask do_poststash_install_cleanup after do_stash_locale do_install before do_populate_sysroot do_package |