summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2021-09-27 15:00:39 -0700
committerSteve Sakoman <steve@sakoman.com>2021-09-30 04:20:38 -1000
commiteb65a5870a1f5c5a4fbce0df87a7dbfb38487dce (patch)
treef748059a07001fd768dd70ffeabbb193d6dc8933
parentdd705fccfb35f9d3fee1452a5145d4e7ad24999d (diff)
downloadopenembedded-core-contrib-eb65a5870a1f5c5a4fbce0df87a7dbfb38487dce.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. 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>
-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 () {
# sstate version since otherwise we'd need to leave 'plaindirs' around
# such as 'packages' and 'packages-split' and these can be large. No end
# of chain tasks depend directly on do_package anymore.
- rm -f $i;
+ rm -f -- $i;
;;
*_setscene*)
# Skip stamps which are already setscene versions
@@ -90,7 +90,7 @@ do_rm_work () {
;;
esac
done
- rm -f $i
+ rm -f -- $i
esac
done
@@ -100,9 +100,9 @@ do_rm_work () {
# 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
+ rm -rf -- $dir 2> /dev/null || true
elif ! echo "$excludes" | grep -q -w "$dir"; then
- rm -rf $dir
+ rm -rf -- $dir
fi
done
}