diff options
author | Jacob Kroon <jacob.kroon@gmail.com> | 2019-11-07 16:35:15 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-10 14:06:10 +0000 |
commit | 381ebd7439ec5acd06b0f322d919299a39623b74 (patch) | |
tree | d2c539ac61667cf34875a8260040716643851fbf | |
parent | 92b60da8b21c2113b00ea420231344202e532fe3 (diff) | |
download | poky-381ebd7439ec5acd06b0f322d919299a39623b74.tar.gz |
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
(From OE-Core rev: 3fe6574c93a02e2e67d16e66f24be1053af383b7)
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/rm_work.bbclass | 49 |
1 files changed, 15 insertions, 34 deletions
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass index 0bbc450100..01c2ab1c78 100644 --- a/meta/classes/rm_work.bbclass +++ b/meta/classes/rm_work.bbclass | |||
@@ -47,39 +47,26 @@ do_rm_work () { | |||
47 | cd `dirname ${STAMP}` | 47 | cd `dirname ${STAMP}` |
48 | for i in `basename ${STAMP}`* | 48 | for i in `basename ${STAMP}`* |
49 | do | 49 | do |
50 | # By default we'll delete the stamp, unless $i is changed by the inner loop | ||
51 | # (i=dummy does this) | ||
52 | |||
53 | case $i in | 50 | case $i in |
54 | *sigdata*|*sigbasedata*) | 51 | *sigdata*|*sigbasedata*) |
55 | # Save/skip anything that looks like a signature data file. | 52 | # Save/skip anything that looks like a signature data file. |
56 | i=dummy | ||
57 | ;; | 53 | ;; |
58 | *do_image_complete_setscene*) | 54 | *do_image_complete_setscene*|*do_image_qa_setscene*) |
59 | # Ensure we don't 'stack' setscene extensions to this stamp with the section below | 55 | # Ensure we don't 'stack' setscene extensions to these stamps with the sections below |
60 | i=dummy | ||
61 | ;; | 56 | ;; |
62 | *do_image_complete*) | 57 | *do_image_complete*) |
63 | # Promote do_image_complete stamps to setscene versions (ahead of *do_image* below) | 58 | # Promote do_image_complete stamps to setscene versions (ahead of *do_image* below) |
64 | mv $i `echo $i | sed -e "s#do_image_complete#do_image_complete_setscene#"` | 59 | mv $i `echo $i | sed -e "s#do_image_complete#do_image_complete_setscene#"` |
65 | i=dummy | ||
66 | ;; | ||
67 | *do_image_qa_setscene*) | ||
68 | # Ensure we don't 'stack' setscene extensions to this stamp with the section below | ||
69 | i=dummy | ||
70 | ;; | 60 | ;; |
71 | *do_image_qa*) | 61 | *do_image_qa*) |
72 | # Promote do_image_qa stamps to setscene versions (ahead of *do_image* below) | 62 | # Promote do_image_qa stamps to setscene versions (ahead of *do_image* below) |
73 | mv $i `echo $i | sed -e "s#do_image_qa#do_image_qa_setscene#"` | 63 | mv $i `echo $i | sed -e "s#do_image_qa#do_image_qa_setscene#"` |
74 | i=dummy | ||
75 | ;; | 64 | ;; |
76 | *do_package_write*|*do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*|*do_build*) | 65 | *do_package_write*|*do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*|*do_build*) |
77 | i=dummy | ||
78 | ;; | 66 | ;; |
79 | *do_addto_recipe_sysroot*) | 67 | *do_addto_recipe_sysroot*) |
80 | # Preserve recipe-sysroot-native if do_addto_recipe_sysroot has been used | 68 | # Preserve recipe-sysroot-native if do_addto_recipe_sysroot has been used |
81 | excludes="$excludes recipe-sysroot-native" | 69 | excludes="$excludes recipe-sysroot-native" |
82 | i=dummy | ||
83 | ;; | 70 | ;; |
84 | *do_package|*do_package.*|*do_package_setscene.*) | 71 | *do_package|*do_package.*|*do_package_setscene.*) |
85 | # We remove do_package entirely, including any | 72 | # We remove do_package entirely, including any |
@@ -87,30 +74,24 @@ do_rm_work () { | |||
87 | # such as 'packages' and 'packages-split' and these can be large. No end | 74 | # such as 'packages' and 'packages-split' and these can be large. No end |
88 | # of chain tasks depend directly on do_package anymore. | 75 | # of chain tasks depend directly on do_package anymore. |
89 | rm -f $i; | 76 | rm -f $i; |
90 | i=dummy | ||
91 | ;; | 77 | ;; |
92 | *_setscene*) | 78 | *_setscene*) |
93 | # Skip stamps which are already setscene versions | 79 | # Skip stamps which are already setscene versions |
94 | i=dummy | ||
95 | ;; | 80 | ;; |
81 | *) | ||
82 | # For everything else: if suitable, promote the stamp to a setscene | ||
83 | # version, otherwise remove it | ||
84 | for j in ${SSTATETASKS} do_shared_workdir | ||
85 | do | ||
86 | case $i in | ||
87 | *$j|*$j.*) | ||
88 | mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"` | ||
89 | break | ||
90 | ;; | ||
91 | esac | ||
92 | done | ||
93 | rm -f $i | ||
96 | esac | 94 | esac |
97 | |||
98 | for j in ${SSTATETASKS} do_shared_workdir | ||
99 | do | ||
100 | case $i in | ||
101 | dummy) | ||
102 | break | ||
103 | ;; | ||
104 | *$j|*$j.*) | ||
105 | # Promote the stamp to a setscene version | ||
106 | mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"` | ||
107 | i=dummy | ||
108 | break | ||
109 | ;; | ||
110 | esac | ||
111 | done | ||
112 | |||
113 | rm -f $i | ||
114 | done | 95 | done |
115 | 96 | ||
116 | cd ${WORKDIR} | 97 | cd ${WORKDIR} |