diff options
Diffstat (limited to 'meta')
-rw-r--r-- | 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 3516c7edf8..9b7220fc2b 100644 --- a/meta/classes/rm_work.bbclass +++ b/meta/classes/rm_work.bbclass | |||
@@ -10,6 +10,14 @@ | |||
10 | # | 10 | # |
11 | # RM_WORK_EXCLUDE += "icu-native icu busybox" | 11 | # RM_WORK_EXCLUDE += "icu-native icu busybox" |
12 | # | 12 | # |
13 | # Recipes can also configure which entries in their ${WORKDIR} | ||
14 | # are preserved besides temp, which already gets excluded by default | ||
15 | # because it contains logs: | ||
16 | # do_install_append () { | ||
17 | # echo "bar" >${WORKDIR}/foo | ||
18 | # } | ||
19 | # RM_WORK_EXCLUDE_ITEMS += "foo" | ||
20 | RM_WORK_EXCLUDE_ITEMS = "temp" | ||
13 | 21 | ||
14 | # Use the completion scheduler by default when rm_work is active | 22 | # Use the completion scheduler by default when rm_work is active |
15 | # to try and reduce disk usage | 23 | # to try and reduce disk usage |
@@ -37,7 +45,7 @@ do_rm_work () { | |||
37 | # failures of removing pseudo folers on NFS2/3 server. | 45 | # failures of removing pseudo folers on NFS2/3 server. |
38 | if [ $dir = 'pseudo' ]; then | 46 | if [ $dir = 'pseudo' ]; then |
39 | rm -rf $dir 2> /dev/null || true | 47 | rm -rf $dir 2> /dev/null || true |
40 | elif [ $dir != 'temp' ]; then | 48 | elif ! echo '${RM_WORK_EXCLUDE_ITEMS}' | grep -q -w "$dir"; then |
41 | rm -rf $dir | 49 | rm -rf $dir |
42 | fi | 50 | fi |
43 | done | 51 | done |