Skip to contentSkip to conversation

glibc-package.inc: correct intention for deleting /usr/lib as needed

PATCH Superseded Belal, Awais 4 participants 9 messages Sep 18, 2018 – Sep 27, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

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

#1 lore raw

✗ patchtest: failure for glibc-package.inc: correct intention for deleting /usr/lib as needed

== Series Details ==

Series: glibc-package.inc: correct intention for deleting /usr/lib as needed
Revision: 1
URL : https://patchwork.openembedded.org/series/14118/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 6a1e550838)

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
#2 lore raw
In reply to Belal, Awais

ping!

BR,
Awais
________________________________
From: [email protected] <[email protected]> on behalf of Belal, Awais
Sent: Tuesday, September 18, 2018 3:36 PM
To: [email protected]
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.

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

#3 lore raw
In reply to Belal, Awais

Can you resend using git-send-email, as this patch is encoded in HTML.

Ross

Quoted 44 lines · Awais

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.

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

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#4 lore raw

Hi Ross,

Quoted 1 line
Quoted 1 line

Can you resend using git-send-email, as this patch is encoded in HTML.

My SMTP server is acting up these days, should I simply resend the patch here as an attachment?

BR,
Awais

________________________________________
From: Burton, Ross [[email protected]]
Sent: Thursday, September 20, 2018 4:10 PM
To: Belal, Awais
Cc: OE-core
Subject: Re: [OE-core] [PATCH] glibc-package.inc: correct intention for deleting /usr/lib as needed

Can you resend using git-send-email, as this patch is encoded in HTML.

Ross

Quoted 44 lines · Awais

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.

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

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#5 lore raw

That's better than HTML!

Quoted 64 lines · Awais

Hi Ross,

Quoted 1 line
Quoted 1 line

Can you resend using git-send-email, as this patch is encoded in HTML.

My SMTP server is acting up these days, should I simply resend the patch here as an attachment?

BR,
Awais

________________________________________
From: Burton, Ross [[email protected]]
Sent: Thursday, September 20, 2018 4:10 PM
To: Belal, Awais
Cc: OE-core
Subject: Re: [OE-core] [PATCH] glibc-package.inc: correct intention for deleting /usr/lib as needed

Can you resend using git-send-email, as this patch is encoded in HTML.

Ross

Quoted 44 lines · Awais

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.

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

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#6 lore raw
Quoted 1 line
Quoted 1 line

That's better than HTML!

Attached.

BR,
Awais

________________________________________
From: Burton, Ross <[email protected]>
Sent: Thursday, September 20, 2018 7:46 PM
To: Belal, Awais
Cc: OE-core
Subject: Re: [OE-core] [PATCH] glibc-package.inc: correct intention for deleting /usr/lib as needed

That's better than HTML!

Quoted 59 lines · Awais

Hi Ross,

Quoted 1 line
Quoted 1 line

Can you resend using git-send-email, as this patch is encoded in HTML.

My SMTP server is acting up these days, should I simply resend the patch here as an attachment?

BR,
Awais

________________________________________
From: Burton, Ross [[email protected]]
Sent: Thursday, September 20, 2018 4:10 PM
To: Belal, Awais
Cc: OE-core
Subject: Re: [OE-core] [PATCH] glibc-package.inc: correct intention for deleting /usr/lib as needed

Can you resend using git-send-email, as this patch is encoded in HTML.

Ross

Quoted 39 lines · Awais

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.

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

Quoted 5 lines
Quoted 5 lines

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

From 5bc4f7f07903baf8b9bd150ccd66107941747312 Mon Sep 17 00:00:00 2001
From: Awais Belal <[email protected]>
Date: Tue, 18 Sep 2018 13:50:59 +0500
Subject: [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.

---
 meta/recipes-core/glibc/glibc-package.inc | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
meta/recipes-core/glibc/glibc-package.inc +4 -5
index 9ea41b7..22a59d2 100644
@@ -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
Signature · 1 line
2.7.4
#7 lore raw

Hi Ross,

When do you think this would go in?

BR,
Awais

________________________________________
From: [email protected] <[email protected]> on behalf of Belal, Awais
Sent: Friday, September 21, 2018 6:31 PM
To: Burton, Ross
Cc: OE-core
Subject: Re: [OE-core] [PATCH] glibc-package.inc: correct intention for deleting /usr/lib as needed

Quoted 1 line
Quoted 1 line

That's better than HTML!

Attached.

BR,
Awais

________________________________________
From: Burton, Ross <[email protected]>
Sent: Thursday, September 20, 2018 7:46 PM
To: Belal, Awais
Cc: OE-core
Subject: Re: [OE-core] [PATCH] glibc-package.inc: correct intention for deleting /usr/lib as needed

That's better than HTML!

Quoted 64 lines · Awais

Hi Ross,

Quoted 1 line
Quoted 1 line

Can you resend using git-send-email, as this patch is encoded in HTML.

My SMTP server is acting up these days, should I simply resend the patch here as an attachment?

BR,
Awais

________________________________________
From: Burton, Ross [[email protected]]
Sent: Thursday, September 20, 2018 4:10 PM
To: Belal, Awais
Cc: OE-core
Subject: Re: [OE-core] [PATCH] glibc-package.inc: correct intention for deleting /usr/lib as needed

Can you resend using git-send-email, as this patch is encoded in HTML.

Ross

Quoted 44 lines · Awais

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.

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

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#8 lore raw
Quoted 1 line · Awais

When do you think this would go in?

Its not going in, it doesn't build and broke things.

I thought someone had reported back but that hasn't happened, sorry. Getting SWAT on the autobuilder to happen reliably is proving tricky right now :(.

An example failure:

https://autobuilder.yoctoproject.org/typhoon/#/builders/2/builds/62/steps/7/logs/step1b

I think we aborted that build run after the errors:
https://autobuilder.yoctoproject.org/typhoon/#/builders/6/builds/71
so most say cancelled but I think other errors were piling up.

Cheers,

Richard