diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-19 11:29:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-21 09:34:40 +0100 |
commit | 52b11deeb921ba201c16641bc10ff71b8ed16164 (patch) | |
tree | 3f8b67137dbadb1c37c2d3ce4e5ef22464376830 /meta | |
parent | 79f6fa34ae65661aa2ad4c27806ed8de6b3afd04 (diff) | |
download | poky-52b11deeb921ba201c16641bc10ff71b8ed16164.tar.gz |
rm_work: Simplify looping code
The current looping structure is confusing, simplify it a bit
to improve readability. Should be no functionality changes.
(From OE-Core rev: 498065b51b205b43d7dae1008014eba85a8f138c)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/rm_work.bbclass | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass index 036680f5fa..10e134b958 100644 --- a/meta/classes/rm_work.bbclass +++ b/meta/classes/rm_work.bbclass | |||
@@ -50,47 +50,46 @@ do_rm_work () { | |||
50 | # By default we'll delete the stamp, unless $i is changed by the inner loop | 50 | # By default we'll delete the stamp, unless $i is changed by the inner loop |
51 | # (i=dummy does this) | 51 | # (i=dummy does this) |
52 | 52 | ||
53 | case $i in | ||
54 | *sigdata*|*sigbasedata*) | ||
55 | # Save/skip anything that looks like a signature data file. | ||
56 | i=dummy | ||
57 | ;; | ||
58 | *do_image_complete_setscene*) | ||
59 | # Ensure we don't 'stack' setscene extensions to this stamp with the section below | ||
60 | i=dummy | ||
61 | ;; | ||
62 | *do_image_complete*) | ||
63 | # 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#"` | ||
65 | i=dummy | ||
66 | ;; | ||
67 | *do_package_write*|*do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*|*do_build*) | ||
68 | i=dummy | ||
69 | ;; | ||
70 | *do_addto_recipe_sysroot*) | ||
71 | # Preserve recipe-sysroot-native if do_addto_recipe_sysroot has been used | ||
72 | excludes="$excludes recipe-sysroot-native" | ||
73 | i=dummy | ||
74 | ;; | ||
75 | *do_package|*do_package.*|*do_package_setscene.*) | ||
76 | # We remove do_package entirely, including any | ||
77 | # sstate version since otherwise we'd need to leave 'plaindirs' around | ||
78 | # such as 'packages' and 'packages-split' and these can be large. No end | ||
79 | # of chain tasks depend directly on do_package anymore. | ||
80 | rm -f $i; | ||
81 | i=dummy | ||
82 | ;; | ||
83 | *_setscene*) | ||
84 | # Skip stamps which are already setscene versions | ||
85 | i=dummy | ||
86 | ;; | ||
87 | esac | ||
88 | |||
53 | for j in ${SSTATETASKS} do_shared_workdir | 89 | for j in ${SSTATETASKS} do_shared_workdir |
54 | do | 90 | do |
55 | case $i in | 91 | case $i in |
56 | *sigdata*|*sigbasedata*) | 92 | dummy) |
57 | # Save/skip anything that looks like a signature data file. | ||
58 | i=dummy | ||
59 | break | ||
60 | ;; | ||
61 | *do_image_complete_setscene*) | ||
62 | # Ensure we don't 'stack' setscene extensions to this stamp with the section below | ||
63 | i=dummy | ||
64 | break | ||
65 | ;; | ||
66 | *do_image_complete*) | ||
67 | # Promote do_image_complete stamps to setscene versions (ahead of *do_image* below) | ||
68 | mv $i `echo $i | sed -e "s#do_image_complete#do_image_complete_setscene#"` | ||
69 | i=dummy | ||
70 | break | ||
71 | ;; | ||
72 | *do_package_write*|*do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*|*do_build*) | ||
73 | i=dummy | ||
74 | break | ||
75 | ;; | ||
76 | *do_addto_recipe_sysroot*) | ||
77 | # Preserve recipe-sysroot-native if do_addto_recipe_sysroot has been used | ||
78 | excludes="$excludes recipe-sysroot-native" | ||
79 | i=dummy | ||
80 | break | ||
81 | ;; | ||
82 | *do_package|*do_package.*|*do_package_setscene.*) | ||
83 | # We remove do_package entirely, including any | ||
84 | # sstate version since otherwise we'd need to leave 'plaindirs' around | ||
85 | # such as 'packages' and 'packages-split' and these can be large. No end | ||
86 | # of chain tasks depend directly on do_package anymore. | ||
87 | rm -f $i; | ||
88 | i=dummy | ||
89 | break | ||
90 | ;; | ||
91 | *_setscene*) | ||
92 | # Skip stamps which are already setscene versions | ||
93 | i=dummy | ||
94 | break | 93 | break |
95 | ;; | 94 | ;; |
96 | *$j|*$j.*) | 95 | *$j|*$j.*) |
@@ -98,9 +97,10 @@ do_rm_work () { | |||
98 | mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"` | 97 | mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"` |
99 | i=dummy | 98 | i=dummy |
100 | break | 99 | break |
101 | ;; | 100 | ;; |
102 | esac | 101 | esac |
103 | done | 102 | done |
103 | |||
104 | rm -f $i | 104 | rm -f $i |
105 | done | 105 | done |
106 | 106 | ||