[poky] [PATCH 2/3] rm_work.bbclass: handle stamp files while doing rm_work

Richard Purdie richard.purdie at linuxfoundation.org
Thu Jan 27 03:13:23 PST 2011


On Thu, 2011-01-27 at 16:04 +0800, Dongxiao Xu wrote:
> diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
> index 260ecb0..a151f4c 100644
> --- a/meta/classes/rm_work.bbclass
> +++ b/meta/classes/rm_work.bbclass
> @@ -26,6 +26,23 @@ do_rm_work () {
>      # Need to add pseudo back or subsqeuent work in this workdir
>      # might fail since setscene may not rerun to recreate it
>      mkdir ${WORKDIR}/pseudo/
> +
> +    rm -rf `ls ${STAMP}* | grep -v sigdata | grep -v do_populate_sysroot | grep -v do_package` ${STAMP}.do_package_write
> +
> +    for stamp in `ls ${STAMP}* | grep do_package_write_* | grep -v setscene`
> +    do
> +        mv $stamp $stamp\_setscene
> +    done
> +
> +    for task in do_populate_sysroot do_package
> +    do
> +        if [ -e ${STAMP}.$task ]; then
> +            mv ${STAMP}.$task ${STAMP}.$task\_setscene
> +        elif [ -e ${STAMP}.$task.${MACHINE} ]; then
> +            mv ${STAMP}.$task.${MACHINE} ${STAMP}.$task\_setscene.${MACHINE}
> +        fi
> +    done
> +
>  }
>  addtask rm_work after do_${RMWORK_ORIG_TASK}

This is the right approach, however, if I set BB_SIGNATURE_HANDLER =
"basichash" it will break since the stamps then look like:

ncurses-5.7-r0.do_populate_sysroot.59a5b1c1ce0a1bab23be44c27ba308a5.qemux86

and also, if we add new tasks to sstate, this code would then need to be
updated with the new tasknames.

I ended up writing http://git.pokylinux.org/cgit.cgi/poky/commit/?id=e8e9f56057f3732d2550375a23573ab7231eac22
which I merged into master to address the problem since its breaking the
autobuilder and people's builds out there. I'd have thought there would
be a neater way to do this but I can't find one at the moment. Any
improvements anyone can see are welcome.

Cheers,

Richard






More information about the poky mailing list