[oe-commits] [openembedded-core] 04/04: rm_work: Improve code comments

git at git.openembedded.org git at git.openembedded.org
Tue Jun 19 10:25:05 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 2f2fc9bd354c5e3cef0ba815bea43bffee3ad1e8
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Jun 19 11:23:42 2018 +0100

    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 at linuxfoundation.org>
---
 meta/classes/rm_work.bbclass | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index b45b18c..036680f 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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list