From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Greylist: delayed 983 seconds by postgrey-1.34 at layers.openembedded.org; Tue, 18 Sep 2018 10:52:35 UTC Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by mail.openembedded.org (Postfix) with ESMTP id 4000F796B7 for ; Tue, 18 Sep 2018 10:52:35 +0000 (UTC) Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g2DMb-0002Z1-21 from Awais_Belal@mentor.com for openembedded-core@lists.openembedded.org; Tue, 18 Sep 2018 03:36:13 -0700 Received: from SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 18 Sep 2018 11:36:09 +0100 Received: from SVR-IES-MBX-03.mgc.mentorg.com ([fe80::1072:fb6e:87f1:ed17]) by SVR-IES-MBX-03.mgc.mentorg.com ([fe80::1072:fb6e:87f1:ed17%22]) with mapi id 15.00.1320.000; Tue, 18 Sep 2018 11:36:09 +0100 From: "Belal, Awais" To: "openembedded-core@lists.openembedded.org" Thread-Topic: [PATCH] glibc-package.inc: correct intention for deleting /usr/lib as needed Thread-Index: AQHUTzrReK7EozvamEuUEKOJij+4eQ== Date: Tue, 18 Sep 2018 10:36:09 +0000 Message-ID: <1537266969204.31967@mentor.com> Accept-Language: en-US, en-IE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [137.202.0.90] MIME-Version: 1.0 Subject: [PATCH] glibc-package.inc: correct intention for deleting /usr/lib as needed X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2018 10:52:35 -0000 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_153726696920431967mentorcom_" --_000_153726696920431967mentorcom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 --- 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}" !=3D "${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 befo= re do_populate_sysroot do_package -- 2.7.4 --_000_153726696920431967mentorcom_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

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}" !=3D "${exec_prefi= x}/lib" ]; then
-        if [ -d ${D}${exec_prefix}/lib/local= e ] ; then
-            rm -rf ${D}${exec= _prefix}/lib/locale
-            # error out if di= rectory isn't empty
-            rm -f ${D}${exec_= prefix}/lib
-        fi
+        # error out if directory isn't e= mpty
+        # this dir should only contain l= ocale 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


--_000_153726696920431967mentorcom_--