diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-19 11:23:42 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-19 13:23:10 +0100 |
commit | 3e0c22e9bd9757cd458a073a3f043a48184d7bab (patch) | |
tree | a8f5d195d402931114b3de4bbe2af8ff368db510 /meta/classes | |
parent | b13a691f1cfc0d68a0f94c343fa3a1b987dbe117 (diff) | |
download | openembedded-core-3e0c22e9bd9757cd458a073a3f043a48184d7bab.tar.gz openembedded-core-3e0c22e9bd9757cd458a073a3f043a48184d7bab.tar.bz2 openembedded-core-3e0c22e9bd9757cd458a073a3f043a48184d7bab.zip |
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/classes')
-rw-r--r-- | meta/classes/rm_work.bbclass | 26 |
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 |