From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by mail.openembedded.org (Postfix) with ESMTP id 76FB4794DE for ; Thu, 20 Sep 2018 08:00:23 +0000 (UTC) Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-03.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g2tsu-0005TZ-QF from Awais_Belal@mentor.com for openembedded-core@lists.openembedded.org; Thu, 20 Sep 2018 01:00:24 -0700 Received: from SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) by SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 20 Sep 2018 09:00:20 +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; Thu, 20 Sep 2018 09:00:20 +0100 From: "Belal, Awais" To: "openembedded-core@lists.openembedded.org" Thread-Topic: [OE-core] [PATCH] glibc-package.inc: correct intention for deleting /usr/lib as needed Thread-Index: AQHUTzrReK7EozvamEuUEKOJij+4eaT40Wdy Date: Thu, 20 Sep 2018 08:00:20 +0000 Message-ID: <1537430416414.88965@mentor.com> References: <1537266969204.31967@mentor.com> In-Reply-To: <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: [192.94.31.225] MIME-Version: 1.0 Subject: Re: [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: Thu, 20 Sep 2018 08:00:23 -0000 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_153743041641488965mentorcom_" --_000_153743041641488965mentorcom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ping! BR, Awais ________________________________ From: openembedded-core-bounces@lists.openembedded.org on behalf of Belal, Awais Sent: Tuesday, September 18, 2018 3:36 PM To: openembedded-core@lists.openembedded.org Subject: [OE-core] [PATCH] glibc-package.inc: correct intention for deletin= g /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 --- 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_153743041641488965mentorcom_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

ping!


BR,
Awais

From: openembedded-core-b= ounces@lists.openembedded.org <openembedded-core-bounces@lists.openembed= ded.org> on behalf of Belal, Awais
Sent: Tuesday, September 18, 2018 3:36 PM
To: openembedded-core@lists.openembedded.org
Subject: [OE-core] [PATCH] 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@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_153743041641488965mentorcom_--