On Thu, 2022-12-01 at 16:09 +0800, Chen Qi wrote:
> The do_build recrdeptask dependencies are removed for a cleaner
> dependency relationship. This, however, makes rm_work behave
> differently than previous releases. Not all built recipes' ${WORKDIR}
> are cleaned. This is because we use the 'depends' varflag to
> specify some dependencies, and rm_work cannot handle such case.
> e.g.
> do_rootfs[depends] += " makedevs-native:do_populate_sysroot ..."
>
> I really don't see an easy way to restore previous behavior, but
> we can use `--runall build' to ensure all built recipes' ${WORKDIR}
> are cleaned.
> e.g.
> bitbake core-image-minimal --runall build
>
> It would be helpful to add such note in this bbclass, as people who
> use rm_work might also want cleaning all workdirs.
>
> The following testing is done to ensure that the extra tasks added by
> specifying '--runall build' should be mostly do_build, do_rm_work_all
> and do_rm_work.
> '''
> 1. bitbake -g core-image-minimal && grep label task-depends.dot > current
> 2. bitbake -g core-image-minimal --runall build && grep label
> task-depends.dot > runall-build
> 3. diff current runall-build | grep '^>' | grep -v do_rm_work_all | grep -v
> do_build | grep -v do_rm_work
> '''
> In my testing, the output is empty, which demonstrates that all extra
> tasks introduced by '--runall build' are these three tasks.
>
> Signed-off-by: Chen Qi <[email protected]>
> ---
> meta/classes/rm_work.bbclass | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
> index 4121a13279..b54d949e46 100644
> --- a/meta/classes/rm_work.bbclass
> +++ b/meta/classes/rm_work.bbclass
> @@ -23,6 +23,13 @@
> # echo "bar" >${WORKDIR}/foo
> # }
> # RM_WORK_EXCLUDE_ITEMS += "foo"
> +#
> +# Note:
> +# After removing the do_build recrdeptask dependencies,
I don't think this wording is going to age well, it refers to a
previous event which nobody will remember in the future. I think if we
do add anything, it needs to be worded differently.
> merely running
> +# `bitbake recipeA' does not clean all built recipes' ${WORKDIR}.
> +# To ensure all built recipes' ${WORKDIR} are cleaned up, run
> +# `bitbake recipeA --runall build'
> +#
> RM_WORK_EXCLUDE_ITEMS = "temp"
I am worried this is really something most users of rm_work will
consider a bug and want the issue fixed "properly" too. As you say,
finding a fix for it is going to be rather tricky though :(.
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#174052):
https://lists.openembedded.org/g/openembedded-core/message/174052
Mute This Topic: https://lists.openembedded.org/mt/95377781/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-