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-09-28 17:55:04 +0100
commit3af6389ece4492b1fd6ecacc6f3e670f1a2a6dfe (patch)
treed055c65be6dc75100132b454f761e8f5538d673c /meta/classes/rm_work.bbclass
parent17bd442f1a36ae531ddd5858131dc12815640db3 (diff)
downloadpoky-3af6389ece4492b1fd6ecacc6f3e670f1a2a6dfe.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: 5f1a63e0de4921ef970114a16d0827fcddcdaa0e) Signed-off-by: William A. Kennington III <wak@google.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 07901d7597..5f12d5aaeb 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}