[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4106/8267] rm_work.bbclass: allow preserving additional content
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 4106/8267] rm_work.bbclass: allow preserving additional content
- Date: Sun, 17 Dec 2017 01:34:15 +0000 (UTC)
commit 3ba8917c4d890a1fdd3ffb250fe3ef73557542f5
Author: Patrick Ohly <patrick ohly intel com>
Date: Fri Jan 13 15:23:56 2017 +0100
rm_work.bbclass: allow preserving additional content
By default, do_rm_work either skips recipes entirely (when listed in
RM_WORK_EXCLUDE) or removes everything except for temp.
In meta-swupd, virtual image recipes collaborate on producing update
data for the base recipe. Tasks running in the base recipe need some
information from the virtual images.
Those files could be passed via a new shared work directory, but that
scatters data in even more places. It's simpler to use the normal
WORKDIR and teach rm_work.bbclass to not remove the special output
with the new RM_WORK_EXCLUDE_ITEMS.
(From OE-Core rev: 28fbb2dd17033308cc09811fbc4f43e2f6c17f54)
Signed-off-by: Patrick Ohly <patrick ohly intel com>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/rm_work.bbclass | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index 3516c7e..9b7220f 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -10,6 +10,14 @@
#
# RM_WORK_EXCLUDE += "icu-native icu busybox"
#
+# Recipes can also configure which entries in their ${WORKDIR}
+# are preserved besides temp, which already gets excluded by default
+# because it contains logs:
+# do_install_append () {
+# echo "bar" >${WORKDIR}/foo
+# }
+# RM_WORK_EXCLUDE_ITEMS += "foo"
+RM_WORK_EXCLUDE_ITEMS = "temp"
# Use the completion scheduler by default when rm_work is active
# to try and reduce disk usage
@@ -37,7 +45,7 @@ do_rm_work () {
# failures of removing pseudo folers on NFS2/3 server.
if [ $dir = 'pseudo' ]; then
rm -rf $dir 2> /dev/null || true
- elif [ $dir != 'temp' ]; then
+ elif ! echo '${RM_WORK_EXCLUDE_ITEMS}' | grep -q -w "$dir"; then
rm -rf $dir
fi
done
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]