mirror of
https://git.yoctoproject.org/poky
synced 2026-04-23 00:32:12 +02:00
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. (From OE-Core rev: 3e0c22e9bd9757cd458a073a3f043a48184d7bab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user