summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-19 11:23:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-19 13:23:10 +0100
commit3e0c22e9bd9757cd458a073a3f043a48184d7bab (patch)
treea8f5d195d402931114b3de4bbe2af8ff368db510 /meta
parentb13a691f1cfc0d68a0f94c343fa3a1b987dbe117 (diff)
downloadopenembedded-core-contrib-3e0c22e9bd9757cd458a073a3f043a48184d7bab.tar.gz
rm_work: Improve code comments
This function is a little obtuse, add more comments about what its doing and why. Also combine some of the statements where possible to improve clarity. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/rm_work.bbclass26
1 files changed, 13 insertions, 13 deletions
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index b45b18ce01..036680f5fa 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -47,31 +47,29 @@ do_rm_work () {
cd `dirname ${STAMP}`
for i in `basename ${STAMP}`*
do
+ # By default we'll delete the stamp, unless $i is changed by the inner loop
+ # (i=dummy does this)
+
for j in ${SSTATETASKS} do_shared_workdir
do
case $i in
*sigdata*|*sigbasedata*)
- i=dummy
- break
- ;;
- *do_package_write*)
+ # Save/skip anything that looks like a signature data file.
i=dummy
break
;;
*do_image_complete_setscene*)
+ # Ensure we don't 'stack' setscene extensions to this stamp with the section below
i=dummy
break
;;
*do_image_complete*)
+ # Promote do_image_complete stamps to setscene versions (ahead of *do_image* below)
mv $i `echo $i | sed -e "s#do_image_complete#do_image_complete_setscene#"`
i=dummy
break
;;
- *do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*)
- i=dummy
- break
- ;;
- *do_build*)
+ *do_package_write*|*do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*|*do_build*)
i=dummy
break
;;
@@ -81,20 +79,22 @@ do_rm_work () {
i=dummy
break
;;
- # We remove do_package entirely, including any
- # 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.
*do_package|*do_package.*|*do_package_setscene.*)
+ # We remove do_package entirely, including any
+ # 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;
i=dummy
break
;;
*_setscene*)
+ # Skip stamps which are already setscene versions
i=dummy
break
;;
*$j|*$j.*)
+ # Promote the stamp to a setscene version
mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"`
i=dummy
break