summaryrefslogtreecommitdiffstats
path: root/meta/classes/rm_work.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-19 11:23:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-21 09:34:40 +0100
commit79f6fa34ae65661aa2ad4c27806ed8de6b3afd04 (patch)
tree543caebe80328a157e464b8ae5f19b525b050f1b /meta/classes/rm_work.bbclass
parent3b78eebd0996d52540c9c36625eff6e13b40638f (diff)
downloadpoky-79f6fa34ae65661aa2ad4c27806ed8de6b3afd04.tar.gz
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. (From OE-Core rev: 3e0c22e9bd9757cd458a073a3f043a48184d7bab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rm_work.bbclass')
-rw-r--r--meta/classes/rm_work.bbclass26
1 files changed, 13 insertions, 13 deletions
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index b45b18ce01..036680f5fa 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -47,31 +47,29 @@ 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
50 for j in ${SSTATETASKS} do_shared_workdir 53 for j in ${SSTATETASKS} do_shared_workdir
51 do 54 do
52 case $i in 55 case $i in
53 *sigdata*|*sigbasedata*) 56 *sigdata*|*sigbasedata*)
54 i=dummy 57 # Save/skip anything that looks like a signature data file.
55 break
56 ;;
57 *do_package_write*)
58 i=dummy 58 i=dummy
59 break 59 break
60 ;; 60 ;;
61 *do_image_complete_setscene*) 61 *do_image_complete_setscene*)
62 # Ensure we don't 'stack' setscene extensions to this stamp with the section below
62 i=dummy 63 i=dummy
63 break 64 break
64 ;; 65 ;;
65 *do_image_complete*) 66 *do_image_complete*)
67 # Promote do_image_complete stamps to setscene versions (ahead of *do_image* below)
66 mv $i `echo $i | sed -e "s#do_image_complete#do_image_complete_setscene#"` 68 mv $i `echo $i | sed -e "s#do_image_complete#do_image_complete_setscene#"`
67 i=dummy 69 i=dummy
68 break 70 break
69 ;; 71 ;;
70 *do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*) 72 *do_package_write*|*do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*|*do_build*)
71 i=dummy
72 break
73 ;;
74 *do_build*)
75 i=dummy 73 i=dummy
76 break 74 break
77 ;; 75 ;;
@@ -81,20 +79,22 @@ do_rm_work () {
81 i=dummy 79 i=dummy
82 break 80 break
83 ;; 81 ;;
84 # We remove do_package entirely, including any
85 # sstate version since otherwise we'd need to leave 'plaindirs' around
86 # such as 'packages' and 'packages-split' and these can be large. No end
87 # of chain tasks depend directly on do_package anymore.
88 *do_package|*do_package.*|*do_package_setscene.*) 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.
89 rm -f $i; 87 rm -f $i;
90 i=dummy 88 i=dummy
91 break 89 break
92 ;; 90 ;;
93 *_setscene*) 91 *_setscene*)
92 # Skip stamps which are already setscene versions
94 i=dummy 93 i=dummy
95 break 94 break
96 ;; 95 ;;
97 *$j|*$j.*) 96 *$j|*$j.*)
97 # Promote the stamp to a setscene version
98 mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"` 98 mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"`
99 i=dummy 99 i=dummy
100 break 100 break