summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/rm_work.bbclass20
1 files changed, 13 insertions, 7 deletions
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index 997dcd18e2..d3be0be887 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -17,15 +17,12 @@ do_rm_work () {
17 cd ${WORKDIR} 17 cd ${WORKDIR}
18 for dir in * 18 for dir in *
19 do 19 do
20 if [ `basename ${S}` = $dir ]; then 20 # Retain only logs and other files in temp.
21 rm -rf $dir 21 if [ $dir != 'temp' ]; then
22 # The package and packages-split directories are retained by sstate for
23 # do_package so we retain them here too. Anything in sstate 'plaindirs'
24 # should be retained. Also retain logs and other files in temp.
25 elif [ $dir != 'temp' ] && [ $dir != 'package' ] && [ $dir != 'packages-split' ]; then
26 rm -rf $dir 22 rm -rf $dir
27 fi 23 fi
28 done 24 done
25
29 # Need to add pseudo back or subsqeuent work in this workdir 26 # Need to add pseudo back or subsqeuent work in this workdir
30 # might fail since setscene may not rerun to recreate it 27 # might fail since setscene may not rerun to recreate it
31 mkdir ${WORKDIR}/pseudo/ 28 mkdir ${WORKDIR}/pseudo/
@@ -54,6 +51,15 @@ do_rm_work () {
54 i=dummy 51 i=dummy
55 break 52 break
56 ;; 53 ;;
54 # We remove do_package entirely, including any
55 # sstate version since otherwise we'd need to leave 'plaindirs' around
56 # such as 'packages' and 'packages-split' and these can be large. No end
57 # of chain tasks depend directly on do_package anymore.
58 *do_package|*do_package.*|*do_package_setscene.*)
59 rm -f $i;
60 i=dummy
61 break
62 ;;
57 *_setscene*) 63 *_setscene*)
58 i=dummy 64 i=dummy
59 break 65 break
@@ -71,7 +77,7 @@ do_rm_work () {
71addtask rm_work after do_${RMWORK_ORIG_TASK} 77addtask rm_work after do_${RMWORK_ORIG_TASK}
72 78
73do_rm_work_all () { 79do_rm_work_all () {
74 : 80 :
75} 81}
76do_rm_work_all[recrdeptask] = "do_rm_work" 82do_rm_work_all[recrdeptask] = "do_rm_work"
77addtask rm_work_all after do_rm_work 83addtask rm_work_all after do_rm_work