[oe-commits] [openembedded-core] 10/27: rm_work: Simplify looping code

git at git.openembedded.org git at git.openembedded.org
Tue Jun 19 12:23:49 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 498065b51b205b43d7dae1008014eba85a8f138c
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Jun 19 11:29:26 2018 +0100

    rm_work: Simplify looping code
    
    The current looping structure is confusing, simplify it a bit
    to improve readability. Should be no functionality changes.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/rm_work.bbclass | 78 ++++++++++++++++++++++----------------------
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index 036680f..10e134b 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -50,47 +50,46 @@ do_rm_work () {
         # By default we'll delete the stamp, unless $i is changed by the inner loop
         # (i=dummy does this)
 
+        case $i in
+        *sigdata*|*sigbasedata*)
+            # Save/skip anything that looks like a signature data file.
+            i=dummy
+            ;;
+        *do_image_complete_setscene*)
+            # Ensure we don't 'stack' setscene extensions to this stamp with the section below
+            i=dummy
+            ;;
+        *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
+            ;;
+        *do_package_write*|*do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*|*do_build*)
+            i=dummy
+            ;;
+        *do_addto_recipe_sysroot*)
+            # Preserve recipe-sysroot-native if do_addto_recipe_sysroot has been used
+            excludes="$excludes recipe-sysroot-native"
+            i=dummy
+            ;;
+        *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
+            ;;
+        *_setscene*)
+            # Skip stamps which are already setscene versions
+            i=dummy
+            ;;
+        esac
+
         for j in ${SSTATETASKS} do_shared_workdir
         do
             case $i in
-            *sigdata*|*sigbasedata*)
-                # 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_package_write*|*do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*|*do_build*)
-                i=dummy
-                break
-                ;;
-            *do_addto_recipe_sysroot*)
-                # Preserve recipe-sysroot-native if do_addto_recipe_sysroot has been used
-                excludes="$excludes recipe-sysroot-native"
-                i=dummy
-                break
-                ;;
-            *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
+            dummy)
                 break
                 ;;
             *$j|*$j.*)
@@ -98,9 +97,10 @@ do_rm_work () {
                 mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"`
                 i=dummy
                 break
-            ;;
+                ;;
             esac
         done
+
         rm -f $i
     done
 

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


More information about the Openembedded-commits mailing list