diff options
author | William A. Kennington III <wak@google.com> | 2021-09-27 15:00:39 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-07 15:10:40 +0100 |
commit | 7c8947e0e083d020b32c104964adef970edaf4ac (patch) | |
tree | caa8384fc11263fe5321be44f389a1c96e8989b8 /meta/classes | |
parent | b3cb8fb619d96cadae1821cd6b26555b73bd38a5 (diff) | |
download | poky-7c8947e0e083d020b32c104964adef970edaf4ac.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: 88d67525dc70c21b5a29dbcef65d12a1c780d717)
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: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/rm_work.bbclass | 8 |
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 | } |