[oe-commits] [openembedded-core] 13/15: rm_work: Simplify logic for setscene promotion

git at git.openembedded.org git at git.openembedded.org
Sun Nov 10 14:07:39 UTC 2019


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

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

commit 3fe6574c93a02e2e67d16e66f24be1053af383b7
Author: Jacob Kroon <jacob.kroon at gmail.com>
AuthorDate: Thu Nov 7 16:35:15 2019 +0100

    rm_work: Simplify logic for setscene promotion
    
    * Instead of overwriting the stamp name with 'dummy', handle
      setscene promotion in the default case block
    * Merge '*do_image_complete_setscene*' and '*do_image_qa_setscene*'
      case handling
    
    Signed-off-by: Jacob Kroon <jacob.kroon at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/rm_work.bbclass | 49 ++++++++++++++------------------------------
 1 file changed, 15 insertions(+), 34 deletions(-)

diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index 0bbc450..01c2ab1 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -47,39 +47,26 @@ 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)
-
         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_setscene*|*do_image_qa_setscene*)
+            # Ensure we don't 'stack' setscene extensions to these stamps with the sections below
             ;;
         *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_image_qa_setscene*)
-            # Ensure we don't 'stack' setscene extensions to this stamp with the section below
-            i=dummy
             ;;
         *do_image_qa*)
             # Promote do_image_qa stamps to setscene versions (ahead of *do_image* below)
             mv $i `echo $i | sed -e "s#do_image_qa#do_image_qa_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
@@ -87,30 +74,24 @@ do_rm_work () {
             # 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
             ;;
+        *)
+            # For everything else: if suitable, promote the stamp to a setscene
+            # version, otherwise remove it
+            for j in ${SSTATETASKS} do_shared_workdir
+            do
+                case $i in
+                *$j|*$j.*)
+                    mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"`
+                    break
+                    ;;
+                esac
+            done
+            rm -f $i
         esac
-
-        for j in ${SSTATETASKS} do_shared_workdir
-        do
-            case $i in
-            dummy)
-                break
-                ;;
-            *$j|*$j.*)
-                # Promote the stamp to a setscene version
-                mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"`
-                i=dummy
-                break
-                ;;
-            esac
-        done
-
-        rm -f $i
     done
 
     cd ${WORKDIR}

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


More information about the Openembedded-commits mailing list