[oe-commits] [openembedded-core] 03/03: glibc-package.inc: correct intention for deleting /usr/lib as needed

git at git.openembedded.org git at git.openembedded.org
Thu Sep 27 16:51:56 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 7f4d5e2825c66a66c72bd5c01f0a648543aa47f2
Author: Awais Belal <awais_belal at mentor.com>
AuthorDate: Thu Sep 27 19:41:43 2018 +0500

    glibc-package.inc: correct intention for deleting /usr/lib as needed
    
    In case the baselib is lib64 we would want to delete /usr/lib
    after removing the /usr/lib/locale dir and the implementation
    wanted to do that earlier as well but the fault was checking
    an already removed dir (/usr/lib/locale) before trying to
    remove /usr/lib as that check would always fail.
    Now we simply try to delete /usr/lib after deleting
    /usr/lib/locale to make sure it deletes cleanly and is empty
    at the time of deletion.
    
    Signed-off-by: Awais Belal <awais_belal at mentor.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-core/glibc/glibc-package.inc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index 9ea41b7..a98ae1a 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -207,10 +207,11 @@ do_poststash_install_cleanup () {
 	rm -rf ${D}/${localedir}
 	rm -rf ${D}${datadir}/locale
 	if [ "${libdir}" != "${exec_prefix}/lib" ]; then
-		if [ -d ${D}${exec_prefix}/lib/locale ] ; then
-			rm -rf ${D}${exec_prefix}/lib/locale
+		if [ -d ${D}${exec_prefix}/lib ]; then
 			# error out if directory isn't empty
-			rm -f ${D}${exec_prefix}/lib
+			# this dir should only contain locale dir
+			# which has been deleted in the previous step
+			rmdir ${D}${exec_prefix}/lib
 		fi
 	fi
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list