rm_work: Allow pseudo directory to be in the excludes

Submitted by dl9pf@gmx.de on Oct. 3, 2020, 4:34 p.m. | Patch ID: 176952

Details

Message ID 20201003163417.67950-1-dl9pf@gmx.de
State New
Headers show

Commit Message

dl9pf@gmx.de Oct. 3, 2020, 4:34 p.m.
From: Jan-Simon Möller <dl9pf@gmx.de>

While debugging the pseudo issues, rm_work was always removing the pseudo folder
even when it was in the RM_WORK_EXCLUDE_ITEMS variable.

This patch puts the pseudo case within the conditional.

Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de>
---
 meta/classes/rm_work.bbclass | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

--
2.26.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#143012): https://lists.openembedded.org/g/openembedded-core/message/143012
Mute This Topic: https://lists.openembedded.org/mt/77284022/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-

Patch hide | download patch | download mbox

diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index 01c2ab1c78..0e52fb6ae6 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -99,10 +99,12 @@  do_rm_work () {
     do
         # Retain only logs and other files in temp, safely ignore
         # failures of removing pseudo folers on NFS2/3 server.
-        if [ $dir = 'pseudo' ]; then
-            rm -rf $dir 2> /dev/null || true
-        elif ! echo "$excludes" | grep -q -w "$dir"; then
-            rm -rf $dir
+        if ! echo "$excludes" | grep -q -w "$dir"; then
+            if [ $dir = 'pseudo' ]; then
+                rm -rf $dir 2> /dev/null || true
+            else
+                rm -rf $dir
+            fi
         fi
     done
 }

Comments

Richard Purdie Oct. 4, 2020, 10:45 p.m.
On Sat, 2020-10-03 at 18:34 +0200, Jan-Simon Möller wrote:
> From: Jan-Simon Möller <dl9pf@gmx.de>
> 
> While debugging the pseudo issues, rm_work was always removing the
> pseudo folder
> even when it was in the RM_WORK_EXCLUDE_ITEMS variable.
> 
> This patch puts the pseudo case within the conditional.

I've mixed feelings on this. Given the things rm_work removes, it has
to remove the pseudo database as well or you will get path mismatch
errors. I suspect we intentionally don't let the user do this.

Have you had this running without issues?

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#143016): https://lists.openembedded.org/g/openembedded-core/message/143016
Mute This Topic: https://lists.openembedded.org/mt/77284022/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-