Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] glibc-package.inc: correct intention for deleting /usr/lib as needed
@ 2018-09-18 10:36 Belal, Awais
  2018-09-18 11:02 ` ✗ patchtest: failure for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Belal, Awais @ 2018-09-18 10:36 UTC (permalink / raw)
  To: openembedded-core@lists.openembedded.org

[-- Attachment #1: Type: text/plain, Size: 1560 bytes --]

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>
---
 meta/recipes-core/glibc/glibc-package.inc | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index 9ea41b7..22a59d2 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -207,11 +207,10 @@ 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
-            # error out if directory isn't empty
-            rm -f ${D}${exec_prefix}/lib
-        fi
+        # error out if directory isn't empty
+        # this dir should only contain locale dir
+        # which has been deleted in the previous step
+        rmdir ${D}${exec_prefix}/lib
     fi
 }
 addtask do_poststash_install_cleanup after do_stash_locale do_install before do_populate_sysroot do_package
--
2.7.4


[-- Attachment #2: Type: text/html, Size: 2904 bytes --]

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-09-27 11:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-18 10:36 [PATCH] glibc-package.inc: correct intention for deleting /usr/lib as needed Belal, Awais
2018-09-18 11:02 ` ✗ patchtest: failure for " Patchwork
2018-09-20  8:00 ` [PATCH] " Belal, Awais
2018-09-20 11:10 ` Burton, Ross
2018-09-20 14:04   ` Belal, Awais
2018-09-20 14:46     ` Burton, Ross
2018-09-21 13:31       ` Belal, Awais
2018-09-27  9:03         ` Belal, Awais
2018-09-27 11:23           ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox