rm_work: Allow pseudo directory to be in the excludes
PATCH 1/1 rm_work: Allow pseudo directory to be in the excludes
From: Jan-Simon Möller <[email protected]>
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.
--- meta/classes/rm_work.bbclass | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
meta/classes/rm_work.bbclass +6 -4
@@ -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 }
--
2.26.2
Quoted 7 lines · Jan-Simon Möller
From: Jan-Simon Möller <[email protected]>
While debugging the pseudo issues,
rm_workwas always removing the pseudo folder
even when it was in theRM_WORK_EXCLUDE_ITEMSvariable.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