summaryrefslogtreecommitdiffstats
path: root/meta/classes/rm_work.bbclass
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2021-09-27 15:00:39 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-07 15:10:33 +0100
commit51fe6c9a07f139b21dbb84cfeabc8612fef0ca7a (patch)
tree83991cb41f7b95a0eb159ca102cefbf43fa8592f /meta/classes/rm_work.bbclass
parent53983505d78a797a3f339199f7306ed67742bdeb (diff)
downloadpoky-51fe6c9a07f139b21dbb84cfeabc8612fef0ca7a.tar.gz
rm_work.bbclass: Fix for files starting with -
This makes it possible to name files starting with a hyphen in the work directory. Without this change rm will fail due to an unexpected option being passed. (From OE-Core rev: eb65a5870a1f5c5a4fbce0df87a7dbfb38487dce) Signed-off-by: William A. Kennington III <wak@google.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5f1a63e0de4921ef970114a16d0827fcddcdaa0e) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rm_work.bbclass')
-rw-r--r--meta/classes/rm_work.bbclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index 01c2ab1c78..2d5a56c238 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -73,7 +73,7 @@ do_rm_work () {
73 # sstate version since otherwise we'd need to leave 'plaindirs' around 73 # sstate version since otherwise we'd need to leave 'plaindirs' around
74 # such as 'packages' and 'packages-split' and these can be large. No end 74 # such as 'packages' and 'packages-split' and these can be large. No end
75 # of chain tasks depend directly on do_package anymore. 75 # of chain tasks depend directly on do_package anymore.
76 rm -f $i; 76 rm -f -- $i;
77 ;; 77 ;;
78 *_setscene*) 78 *_setscene*)
79 # Skip stamps which are already setscene versions 79 # Skip stamps which are already setscene versions
@@ -90,7 +90,7 @@ do_rm_work () {
90 ;; 90 ;;
91 esac 91 esac
92 done 92 done
93 rm -f $i 93 rm -f -- $i
94 esac 94 esac
95 done 95 done
96 96
@@ -100,9 +100,9 @@ do_rm_work () {
100 # Retain only logs and other files in temp, safely ignore 100 # Retain only logs and other files in temp, safely ignore
101 # failures of removing pseudo folers on NFS2/3 server. 101 # failures of removing pseudo folers on NFS2/3 server.
102 if [ $dir = 'pseudo' ]; then 102 if [ $dir = 'pseudo' ]; then
103 rm -rf $dir 2> /dev/null || true 103 rm -rf -- $dir 2> /dev/null || true
104 elif ! echo "$excludes" | grep -q -w "$dir"; then 104 elif ! echo "$excludes" | grep -q -w "$dir"; then
105 rm -rf $dir 105 rm -rf -- $dir
106 fi 106 fi
107 done 107 done
108} 108}