]> code.ossystems Code Review - openembedded-core.git/commitdiff
glibc-package.inc: correct intention for deleting /usr/lib as needed
authorAwais Belal <awais_belal@mentor.com>
Thu, 27 Sep 2018 14:41:43 +0000 (19:41 +0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 27 Sep 2018 22:39:28 +0000 (23:39 +0100)
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@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/glibc/glibc-package.inc

index 9ea41b7b54f558c36eef2ef7dd8c8004e2236713..a98ae1a29c9746b441ea5197ed636e6e09ea7154 100644 (file)
@@ -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
 }